summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-04-26 20:03:22 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-04-26 20:03:22 +0000
commitf20dd1d5a6220c867922d846f54c247a15c18216 (patch)
tree352bf858ec9282cd35c665a03b4abfdfc0f548b0
parent228ccd675484038df21d68b8178bbd56a00be56a (diff)
downloadbcm5719-llvm-f20dd1d5a6220c867922d846f54c247a15c18216.tar.gz
bcm5719-llvm-f20dd1d5a6220c867922d846f54c247a15c18216.zip
[CommandInterpreter] Remove scripting language argument. (NFC)
The script language argument was passed from the debugger to the command interpreter, only to call SetScriptLanguage on the debugger again. It wasn't even used to initialize the script interpreter, because that would query the debugger again. This patch removes the needless back and forth. llvm-svn: 359346
-rw-r--r--lldb/include/lldb/Interpreter/CommandInterpreter.h5
-rw-r--r--lldb/source/Core/Debugger.cpp4
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp2
3 files changed, 3 insertions, 8 deletions
diff --git a/lldb/include/lldb/Interpreter/CommandInterpreter.h b/lldb/include/lldb/Interpreter/CommandInterpreter.h
index a1805e84d9f..e17fc3555a5 100644
--- a/lldb/include/lldb/Interpreter/CommandInterpreter.h
+++ b/lldb/include/lldb/Interpreter/CommandInterpreter.h
@@ -188,8 +188,7 @@ public:
eCommandTypesAllThem = 0xFFFF // all commands
};
- CommandInterpreter(Debugger &debugger, lldb::ScriptLanguage script_language,
- bool synchronous_execution);
+ CommandInterpreter(Debugger &debugger, bool synchronous_execution);
~CommandInterpreter() override;
@@ -372,8 +371,6 @@ public:
void Clear();
- void SetScriptLanguage(lldb::ScriptLanguage lang);
-
bool HasCommands() const;
bool HasAliases() const;
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 3ff9232dec3..9c56905a2ba 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -765,8 +765,8 @@ Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton)
m_terminal_state(), m_target_list(*this), m_platform_list(),
m_listener_sp(Listener::MakeListener("lldb.Debugger")),
m_source_manager_up(), m_source_file_cache(),
- m_command_interpreter_up(llvm::make_unique<CommandInterpreter>(
- *this, eScriptLanguageDefault, false)),
+ m_command_interpreter_up(
+ llvm::make_unique<CommandInterpreter>(*this, false)),
m_input_reader_stack(), m_instance_name(), m_loaded_plugins(),
m_event_handler_thread(), m_io_handler_thread(),
m_sync_broadcaster(nullptr, "lldb.debugger.sync"),
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 84707156871..35596c86435 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -122,7 +122,6 @@ ConstString &CommandInterpreter::GetStaticBroadcasterClass() {
}
CommandInterpreter::CommandInterpreter(Debugger &debugger,
- ScriptLanguage script_language,
bool synchronous_execution)
: Broadcaster(debugger.GetBroadcasterManager(),
CommandInterpreter::GetStaticBroadcasterClass().AsCString()),
@@ -135,7 +134,6 @@ CommandInterpreter::CommandInterpreter(Debugger &debugger,
m_batch_command_mode(false), m_truncation_warning(eNoTruncation),
m_command_source_depth(0), m_num_errors(0), m_quit_requested(false),
m_stopped_for_crash(false) {
- debugger.SetScriptLanguage(script_language);
SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit");
SetEventName(eBroadcastBitResetPrompt, "reset-prompt");
SetEventName(eBroadcastBitQuitCommandReceived, "quit");
OpenPOWER on IntegriCloud