summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupFile.cpp
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2016-08-11 23:51:28 +0000
committerTodd Fiala <todd.fiala@gmail.com>2016-08-11 23:51:28 +0000
commite1cfbc79420fee0b71bad62f8d413b68a0eca91e (patch)
treeab91f6f91be4051731e37ed69ca9ff8c7bdad1ff /lldb/source/Interpreter/OptionGroupFile.cpp
parent1602421c852d9d7fddbe8c5f014d7861a7848865 (diff)
downloadbcm5719-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/Interpreter/OptionGroupFile.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupFile.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Interpreter/OptionGroupFile.cpp b/lldb/source/Interpreter/OptionGroupFile.cpp
index a4b56409698..1f82e579191 100644
--- a/lldb/source/Interpreter/OptionGroupFile.cpp
+++ b/lldb/source/Interpreter/OptionGroupFile.cpp
@@ -43,16 +43,16 @@ OptionGroupFile::~OptionGroupFile ()
}
Error
-OptionGroupFile::SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_arg)
+OptionGroupFile::SetOptionValue(uint32_t option_idx,
+ const char *option_arg,
+ ExecutionContext *execution_context)
{
Error error (m_file.SetValueFromString (option_arg));
return error;
}
void
-OptionGroupFile::OptionParsingStarting (CommandInterpreter &interpreter)
+OptionGroupFile::OptionParsingStarting(ExecutionContext *execution_context)
{
m_file.Clear();
}
@@ -84,16 +84,16 @@ OptionGroupFileList::~OptionGroupFileList ()
}
Error
-OptionGroupFileList::SetOptionValue (CommandInterpreter &interpreter,
- uint32_t option_idx,
- const char *option_arg)
+OptionGroupFileList::SetOptionValue(uint32_t option_idx,
+ const char *option_arg,
+ ExecutionContext *execution_context)
{
Error error (m_file_list.SetValueFromString (option_arg));
return error;
}
void
-OptionGroupFileList::OptionParsingStarting (CommandInterpreter &interpreter)
+OptionGroupFileList::OptionParsingStarting(ExecutionContext *execution_context)
{
m_file_list.Clear();
}
OpenPOWER on IntegriCloud