[lldb] Reinstate default constructor for SBCommandInterpreter

The default constructor for SBCommandInterpreter was (unintentionally)
made protected in 27b6a4e63a. The goal of the patch was to make the
constructor taking an lldb_private type protected, but due to the
presence of a default argument, this ctor also served as the default
constructor. The latter should remain public.

This commit reinstates the original behavior by removing the default
argument and having an explicit, public default constructor.
This commit is contained in:
Jonas Devlieghere
2023-09-09 20:00:34 -07:00
parent f8efa65ca5
commit 86f21e92ab
2 changed files with 7 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ public:
eBroadcastBitAsynchronousErrorData = (1 << 4)
};
SBCommandInterpreter();
SBCommandInterpreter(const lldb::SBCommandInterpreter &rhs);
~SBCommandInterpreter();
@@ -317,9 +318,8 @@ public:
protected:
friend class lldb_private::CommandPluginInterfaceImplementation;
SBCommandInterpreter(
lldb_private::CommandInterpreter *interpreter_ptr =
nullptr); // Access using SBDebugger::GetCommandInterpreter();
/// Access using SBDebugger::GetCommandInterpreter();
SBCommandInterpreter(lldb_private::CommandInterpreter *interpreter_ptr);
lldb_private::CommandInterpreter &ref();
lldb_private::CommandInterpreter *get();

View File

@@ -83,6 +83,10 @@ protected:
};
} // namespace lldb_private
SBCommandInterpreter::SBCommandInterpreter() : m_opaque_ptr() {
LLDB_INSTRUMENT_VA(this);
}
SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter)
: m_opaque_ptr(interpreter) {
LLDB_INSTRUMENT_VA(this, interpreter);