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
diff --git a/lldb/source/Commands/CommandObjectExpression.h b/lldb/source/Commands/CommandObjectExpression.h
index 3445aef..9e62783 100644
--- a/lldb/source/Commands/CommandObjectExpression.h
+++ b/lldb/source/Commands/CommandObjectExpression.h
@@ -44,12 +44,12 @@
GetDefinitions() override;
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;
void
- OptionParsingStarting(CommandInterpreter &interpreter) override;
+ OptionParsingStarting(ExecutionContext *execution_context) override;
// Options table: Required for subclasses of Options.