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

@@ -226,7 +226,7 @@ OptionValueProperties::SetSubValue (const ExecutionContext *exe_ctx,
const bool will_modify = true;
lldb::OptionValueSP value_sp (GetSubValue (exe_ctx, name, will_modify, error));
if (value_sp)
error = value_sp->SetValueFromCString(value, op);
error = value_sp->SetValueFromString(value ? llvm::StringRef(value) : llvm::StringRef(), op);
else
{
if (error.AsCString() == nullptr)
@@ -600,7 +600,7 @@ OptionValueProperties::Clear ()
Error
OptionValueProperties::SetValueFromCString (const char *value, VarSetOperationType op)
OptionValueProperties::SetValueFromString (llvm::StringRef value, VarSetOperationType op)
{
Error error;
@@ -619,7 +619,7 @@ OptionValueProperties::SetValueFromCString (const char *value, VarSetOperationTy
case eVarSetOperationInsertAfter:
case eVarSetOperationAppend:
case eVarSetOperationInvalid:
error = OptionValue::SetValueFromCString (value, op);
error = OptionValue::SetValueFromString (value, op);
break;
}