aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2024-10-02 09:11:47 -0700
committerGitHub <noreply@github.com>2024-10-02 09:11:47 -0700
commit8789c96698e027b0dd40b6e0475181505d6b8984 (patch)
tree18ff1887f07585e3d91bf9bfcf3458f2e0d6c071 /lldb/source/Commands/CommandObjectExpression.cpp
parentb50ce4c81e71855bc01b9564d3bd239437847184 (diff)
downloadllvm-8789c96698e027b0dd40b6e0475181505d6b8984.zip
llvm-8789c96698e027b0dd40b6e0475181505d6b8984.tar.gz
llvm-8789c96698e027b0dd40b6e0475181505d6b8984.tar.bz2
[lldb] Unify implementation of CommandReturnObject::SetError(NFC) (#110707)
This is a cleanup that moves the API towards value semantics.
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 9722c85..a72b409 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -647,8 +647,8 @@ void CommandObjectExpression::DoExecute(llvm::StringRef command,
initialize = true;
repl_sp = target.GetREPL(repl_error, m_command_options.language,
nullptr, true);
- if (!repl_error.Success()) {
- result.SetError(repl_error);
+ if (repl_error.Fail()) {
+ result.SetError(std::move(repl_error));
return;
}
}
@@ -668,7 +668,7 @@ void CommandObjectExpression::DoExecute(llvm::StringRef command,
repl_error = Status::FromErrorStringWithFormat(
"Couldn't create a REPL for %s",
Language::GetNameForLanguageType(m_command_options.language));
- result.SetError(repl_error);
+ result.SetError(std::move(repl_error));
return;
}
}