diff options
Diffstat (limited to 'lldb/source/Interpreter/OptionValueUInt64.cpp')
| -rw-r--r-- | lldb/source/Interpreter/OptionValueUInt64.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Interpreter/OptionValueUInt64.cpp b/lldb/source/Interpreter/OptionValueUInt64.cpp index dc06cfe93d5..b414802b963 100644 --- a/lldb/source/Interpreter/OptionValueUInt64.cpp +++ b/lldb/source/Interpreter/OptionValueUInt64.cpp @@ -23,7 +23,7 @@ lldb::OptionValueSP OptionValueUInt64::Create (const char *value_cstr, Error &error) { lldb::OptionValueSP value_sp (new OptionValueUInt64()); - error = value_sp->SetValueFromCString (value_cstr); + error = value_sp->SetValueFromString (value_cstr); if (error.Fail()) value_sp.reset(); return value_sp; @@ -44,7 +44,7 @@ OptionValueUInt64::DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uin } Error -OptionValueUInt64::SetValueFromCString (const char *value_cstr, VarSetOperationType op) +OptionValueUInt64::SetValueFromString (llvm::StringRef value_ref, VarSetOperationType op) { Error error; switch (op) @@ -58,7 +58,7 @@ OptionValueUInt64::SetValueFromCString (const char *value_cstr, VarSetOperationT case eVarSetOperationAssign: { bool success = false; - std::string value_str = llvm::StringRef(value_cstr).trim().str(); + std::string value_str = value_ref.trim().str(); uint64_t value = StringConvert::ToUInt64 (value_str.c_str(), 0, 0, &success); if (success) { @@ -68,7 +68,7 @@ OptionValueUInt64::SetValueFromCString (const char *value_cstr, VarSetOperationT } else { - error.SetErrorStringWithFormat ("invalid uint64_t string value: '%s'", value_cstr); + error.SetErrorStringWithFormat ("invalid uint64_t string value: '%s'", value_str.c_str()); } } break; @@ -78,7 +78,7 @@ OptionValueUInt64::SetValueFromCString (const char *value_cstr, VarSetOperationT case eVarSetOperationRemove: case eVarSetOperationAppend: case eVarSetOperationInvalid: - error = OptionValue::SetValueFromCString (value_cstr, op); + error = OptionValue::SetValueFromString (value_ref, op); break; } return error; |

