summaryrefslogtreecommitdiffstats
path: root/source/Interpreter/OptionValueFormat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Interpreter/OptionValueFormat.cpp')
-rw-r--r--source/Interpreter/OptionValueFormat.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/Interpreter/OptionValueFormat.cpp b/source/Interpreter/OptionValueFormat.cpp
index d91f10b..1d73d58 100644
--- a/source/Interpreter/OptionValueFormat.cpp
+++ b/source/Interpreter/OptionValueFormat.cpp
@@ -7,8 +7,6 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/lldb-python.h"
-
#include "lldb/Interpreter/OptionValueFormat.h"
// C Includes
@@ -36,7 +34,7 @@ OptionValueFormat::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin
}
Error
-OptionValueFormat::SetValueFromCString (const char *value_cstr, VarSetOperationType op)
+OptionValueFormat::SetValueFromString (llvm::StringRef value, VarSetOperationType op)
{
Error error;
switch (op)
@@ -50,7 +48,7 @@ OptionValueFormat::SetValueFromCString (const char *value_cstr, VarSetOperationT
case eVarSetOperationAssign:
{
Format new_format;
- error = Args::StringToFormat (value_cstr, new_format, nullptr);
+ error = Args::StringToFormat (value.str().c_str(), new_format, nullptr);
if (error.Success())
{
m_value_was_set = true;
@@ -65,7 +63,7 @@ OptionValueFormat::SetValueFromCString (const char *value_cstr, VarSetOperationT
case eVarSetOperationRemove:
case eVarSetOperationAppend:
case eVarSetOperationInvalid:
- error = OptionValue::SetValueFromCString (value_cstr, op);
+ error = OptionValue::SetValueFromString (value, op);
break;
}
return error;
OpenPOWER on IntegriCloud