From e1cfbc79420fee0b71bad62f8d413b68a0eca91e Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Thu, 11 Aug 2016 23:51:28 +0000 Subject: Decoupled Options from CommandInterpreter. Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440 --- lldb/source/Commands/CommandObjectRegister.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lldb/source/Commands/CommandObjectRegister.cpp') diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp index ff8df2a..00b60fb 100644 --- a/lldb/source/Commands/CommandObjectRegister.cpp +++ b/lldb/source/Commands/CommandObjectRegister.cpp @@ -50,7 +50,7 @@ public: eCommandRequiresRegContext | eCommandProcessMustBeLaunched | eCommandProcessMustBePaused ), - m_option_group (interpreter), + m_option_group(), m_format_options (eFormatDefault), m_command_options () { @@ -279,7 +279,7 @@ protected: } void - OptionParsingStarting (CommandInterpreter &interpreter) override + OptionParsingStarting(ExecutionContext *execution_context) override { set_indexes.Clear(); dump_all_sets.Clear(); @@ -287,9 +287,9 @@ protected: } Error - SetOptionValue (CommandInterpreter &interpreter, - uint32_t option_idx, - const char *option_value) override + SetOptionValue (uint32_t option_idx, + const char *option_value, + ExecutionContext *execution_context) override { Error error; const int short_option = g_option_table[option_idx].short_option; -- cgit v1.1