mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user