summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueArch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueArch.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueArch.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/OptionValueArch.cpp b/lldb/source/Interpreter/OptionValueArch.cpp
index 7df149234bd..eae903ce5be 100644
--- a/lldb/source/Interpreter/OptionValueArch.cpp
+++ b/lldb/source/Interpreter/OptionValueArch.cpp
@@ -55,8 +55,10 @@ OptionValueArch::SetValueFromCString (const char *value_cstr, VarSetOperationTyp
case eVarSetOperationReplace:
case eVarSetOperationAssign:
- if (value_cstr && value_cstr[0])
+ if (value_cstr)
{
+ std::string value = llvm::StringRef(value_cstr).trim().str();
+ value_cstr = value.c_str();
if (m_current_value.SetTriple (value_cstr))
{
m_value_was_set = true;
OpenPOWER on IntegriCloud