Refactor OptionValue::SetValueFromCString to use llvm::StringRef

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7676

llvm-svn: 230005
This commit is contained in:
Pavel Labath
2015-02-20 11:14:59 +00:00
parent 0c5f059865
commit c95f7e2a7c
48 changed files with 130 additions and 152 deletions

View File

@@ -34,10 +34,10 @@ OptionValuePathMappings::DumpValue (const ExecutionContext *exe_ctx, Stream &str
}
Error
OptionValuePathMappings::SetValueFromCString (const char *value, VarSetOperationType op)
OptionValuePathMappings::SetValueFromString (llvm::StringRef value, VarSetOperationType op)
{
Error error;
Args args(value);
Args args(value.str().c_str());
const size_t argc = args.GetArgumentCount();
switch (op)
@@ -175,7 +175,7 @@ OptionValuePathMappings::SetValueFromCString (const char *value, VarSetOperation
break;
case eVarSetOperationInvalid:
error = OptionValue::SetValueFromCString (value, op);
error = OptionValue::SetValueFromString (value, op);
break;
}
return error;