aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 769f01d..7711946 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -52,7 +52,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
option_arg.str().c_str());
Language::PrintSupportedLanguagesForExpressions(sstr, " ", "\n");
- error.SetErrorString(sstr.GetString());
+ error = Status(sstr.GetString().str());
}
break;
@@ -61,7 +61,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
bool result;
result = OptionArgParser::ToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"invalid all-threads value setting: \"%s\"",
option_arg.str().c_str());
else
@@ -74,7 +74,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
if (success)
ignore_breakpoints = tmp_value;
else
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"could not convert \"%s\" to a boolean value.",
option_arg.str().c_str());
break;
@@ -86,7 +86,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
if (success)
allow_jit = tmp_value;
else
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"could not convert \"%s\" to a boolean value.",
option_arg.str().c_str());
break;
@@ -95,8 +95,8 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
case 't':
if (option_arg.getAsInteger(0, timeout)) {
timeout = 0;
- error.SetErrorStringWithFormat("invalid timeout setting \"%s\"",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat(
+ "invalid timeout setting \"%s\"", option_arg.str().c_str());
}
break;
@@ -106,7 +106,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
if (success)
unwind_on_error = tmp_value;
else
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"could not convert \"%s\" to a boolean value.",
option_arg.str().c_str());
break;
@@ -121,7 +121,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
OptionArgParser::ToOptionEnum(
option_arg, GetDefinitions()[option_idx].enum_values, 0, error);
if (!error.Success())
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"unrecognized value for description-verbosity '%s'",
option_arg.str().c_str());
break;
@@ -142,7 +142,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
if (success)
auto_apply_fixits = tmp_value ? eLazyBoolYes : eLazyBoolNo;
else
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"could not convert \"%s\" to a boolean value.",
option_arg.str().c_str());
break;
@@ -155,7 +155,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue(
if (success)
suppress_persistent_result = !persist_result ? eLazyBoolYes : eLazyBoolNo;
else
- error.SetErrorStringWithFormat(
+ error = Status::FromErrorStringWithFormat(
"could not convert \"%s\" to a boolean value.",
option_arg.str().c_str());
break;
@@ -392,9 +392,9 @@ CanBeUsedForElementCountPrinting(ValueObject &valobj) {
CompilerType type(valobj.GetCompilerType());
CompilerType pointee;
if (!type.IsPointerType(&pointee))
- return Status("as it does not refer to a pointer");
+ return Status::FromErrorString("as it does not refer to a pointer");
if (pointee.IsVoidType())
- return Status("as it refers to a pointer to void");
+ return Status::FromErrorString("as it refers to a pointer to void");
return Status();
}
@@ -650,7 +650,7 @@ void CommandObjectExpression::DoExecute(llvm::StringRef command,
io_handler_sp->SetIsDone(false);
debugger.RunIOHandlerAsync(io_handler_sp);
} else {
- repl_error.SetErrorStringWithFormat(
+ repl_error = Status::FromErrorStringWithFormat(
"Couldn't create a REPL for %s",
Language::GetNameForLanguageType(m_command_options.language));
result.SetError(repl_error);