diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2016-08-11 23:51:28 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2016-08-11 23:51:28 +0000 |
commit | e1cfbc79420fee0b71bad62f8d413b68a0eca91e (patch) | |
tree | ab91f6f91be4051731e37ed69ca9ff8c7bdad1ff /lldb/source/Commands/CommandObjectHelp.h | |
parent | 1602421c852d9d7fddbe8c5f014d7861a7848865 (diff) | |
download | bcm5719-llvm-e1cfbc79420fee0b71bad62f8d413b68a0eca91e.tar.gz bcm5719-llvm-e1cfbc79420fee0b71bad62f8d413b68a0eca91e.zip |
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.h')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h index a374a10e3e7..6114aa16f07 100644 --- a/lldb/source/Commands/CommandObjectHelp.h +++ b/lldb/source/Commands/CommandObjectHelp.h @@ -52,15 +52,16 @@ public: { public: - CommandOptions (CommandInterpreter &interpreter) : - Options (interpreter) + CommandOptions() : + Options() { } ~CommandOptions() override {} Error - SetOptionValue(uint32_t option_idx, const char *option_arg) override + SetOptionValue(uint32_t option_idx, const char *option_arg, + ExecutionContext *execution_context) override { Error error; const int short_option = m_getopt_table[option_idx].val; @@ -85,7 +86,7 @@ public: } void - OptionParsingStarting() override + OptionParsingStarting(ExecutionContext *execution_context) override { m_show_aliases = true; m_show_user_defined = true; |