Skip to content

Commit 86f21e9

Browse files
committed
[lldb] Reinstate default constructor for SBCommandInterpreter
The default constructor for SBCommandInterpreter was (unintentionally) made protected in 27b6a4e. 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.
1 parent f8efa65 commit 86f21e9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lldb/include/lldb/API/SBCommandInterpreter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class SBCommandInterpreter {
3030
eBroadcastBitAsynchronousErrorData = (1 << 4)
3131
};
3232

33+
SBCommandInterpreter();
3334
SBCommandInterpreter(const lldb::SBCommandInterpreter &rhs);
3435

3536
~SBCommandInterpreter();
@@ -317,9 +318,8 @@ class SBCommandInterpreter {
317318
protected:
318319
friend class lldb_private::CommandPluginInterfaceImplementation;
319320

320-
SBCommandInterpreter(
321-
lldb_private::CommandInterpreter *interpreter_ptr =
322-
nullptr); // Access using SBDebugger::GetCommandInterpreter();
321+
/// Access using SBDebugger::GetCommandInterpreter();
322+
SBCommandInterpreter(lldb_private::CommandInterpreter *interpreter_ptr);
323323
lldb_private::CommandInterpreter &ref();
324324

325325
lldb_private::CommandInterpreter *get();

lldb/source/API/SBCommandInterpreter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ class CommandPluginInterfaceImplementation : public CommandObjectParsed {
8383
};
8484
} // namespace lldb_private
8585

86+
SBCommandInterpreter::SBCommandInterpreter() : m_opaque_ptr() {
87+
LLDB_INSTRUMENT_VA(this);
88+
}
89+
8690
SBCommandInterpreter::SBCommandInterpreter(CommandInterpreter *interpreter)
8791
: m_opaque_ptr(interpreter) {
8892
LLDB_INSTRUMENT_VA(this, interpreter);

0 commit comments

Comments
 (0)