aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2024-09-05 12:44:13 -0700
committerGitHub <noreply@github.com>2024-09-05 12:44:13 -0700
commitb798f4bd50bbf0f5eb46804afad10629797c73aa (patch)
tree44c44e14ff6a7c9b9b7f5f81aa1c67f41f8502b0 /lldb/source/Interpreter
parent53d5ffea6be7216589599b6415c021f8bd13cd37 (diff)
downloadllvm-b798f4bd50bbf0f5eb46804afad10629797c73aa.zip
llvm-b798f4bd50bbf0f5eb46804afad10629797c73aa.tar.gz
llvm-b798f4bd50bbf0f5eb46804afad10629797c73aa.tar.bz2
[lldb] Make deep copies of Status explicit (NFC) (#107170)
Diffstat (limited to 'lldb/source/Interpreter')
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp2
-rw-r--r--lldb/source/Interpreter/ScriptInterpreter.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index df539d5..b93f47a 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1861,7 +1861,7 @@ CommandInterpreter::PreprocessToken(std::string &expr_str) {
// But if for some reason we didn't get a value object at all, then we will
// make up some helpful errors from the expression result.
if (expr_result_valobj_sp)
- error = expr_result_valobj_sp->GetError();
+ error = expr_result_valobj_sp->GetError().Clone();
if (error.Success()) {
std::string result = lldb_private::toString(expr_result) +
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp
index 079ab90..8b55221 100644
--- a/lldb/source/Interpreter/ScriptInterpreter.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreter.cpp
@@ -96,7 +96,7 @@ lldb::ProcessLaunchInfoSP ScriptInterpreter::GetOpaqueTypeFromSBLaunchInfo(
Status
ScriptInterpreter::GetStatusFromSBError(const lldb::SBError &error) const {
if (error.m_opaque_up)
- return *error.m_opaque_up;
+ return error.m_opaque_up->Clone();
return Status();
}