diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-04-30 13:17:48 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-04-30 13:20:06 -0700 |
commit | 32c3224612d84ee7e65907795eaba505f5c90e7c (patch) | |
tree | 9403f30a300bfc0185412c3408521d6fa339e292 /lldb/source/API/SBCommandInterpreter.cpp | |
parent | 21afeddfb25fbde260f84ee6ceaa61e761c1e48c (diff) | |
download | llvm-32c3224612d84ee7e65907795eaba505f5c90e7c.zip llvm-32c3224612d84ee7e65907795eaba505f5c90e7c.tar.gz llvm-32c3224612d84ee7e65907795eaba505f5c90e7c.tar.bz2 |
[lldb/CommandInterpreter] Move everything into CommandInterpreterRunOptions
This implements Greg's suggestion from D78825 to include "auto handle
events" and "spawn thread" in CommandInterpreterRunOptions. This change
is in preparation for adding a new overload for RunCommandInterpreter
that takes only SBCommandInterpreterRunOptions and returns
SBCommandInterpreterRunResults.
Differential revision: https://reviews.llvm.org/D79108
Diffstat (limited to 'lldb/source/API/SBCommandInterpreter.cpp')
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 14d738b..c191c00 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -137,6 +137,35 @@ void SBCommandInterpreterRunOptions::SetAddToHistory(bool add_to_history) { m_opaque_up->SetAddToHistory(add_to_history); } +bool SBCommandInterpreterRunOptions::GetAutoHandleEvents() const { + LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetAutoHandleEvents); + + return m_opaque_up->GetAutoHandleEvents(); +} + +void SBCommandInterpreterRunOptions::SetAutoHandleEvents( + bool auto_handle_events) { + LLDB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetAutoHandleEvents, + (bool), auto_handle_events); + + m_opaque_up->SetAutoHandleEvents(auto_handle_events); +} + +bool SBCommandInterpreterRunOptions::GetSpawnThread() const { + LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, + GetSpawnThread); + + return m_opaque_up->GetSpawnThread(); +} + +void SBCommandInterpreterRunOptions::SetSpawnThread(bool spawn_thread) { + LLDB_RECORD_METHOD(void, SBCommandInterpreterRunOptions, SetSpawnThread, + (bool), spawn_thread); + + m_opaque_up->SetSpawnThread(spawn_thread); +} + lldb_private::CommandInterpreterRunOptions * SBCommandInterpreterRunOptions::get() const { return m_opaque_up.get(); @@ -892,6 +921,14 @@ void RegisterMethods<SBCommandInterpreterRunOptions>(Registry &R) { GetAddToHistory, ()); LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetAddToHistory, (bool)); + LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetAutoHandleEvents, ()); + LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, + SetAutoHandleEvents, (bool)); + LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, + GetSpawnThread, ()); + LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetSpawnThread, + (bool)); LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreter, (lldb_private::CommandInterpreter *)); LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreter, |