summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Target.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2024-11-21 15:37:04 -0800
committerGitHub <noreply@github.com>2024-11-21 15:37:04 -0800
commit6a8a4d51a4415aa453b79f999bed411bad6c3723 (patch)
tree33bd537ae08295fce145d7532b29e51d8e39512d /lldb/source/Target/Target.cpp
parent7672216ed7f480c8d461a2d046a74453307f6298 (diff)
[lldb] Refactor UserExpression::Evaluate to only have one error channel. (#117186)
Prior to this patch, the function returned an exit status, sometimes a ValueObject with an error and a Status object. This patch removes the Status object and ensures the error is consistently returned as the error of the ValueObject.
Diffstat (limited to 'lldb/source/Target/Target.cpp')
-rw-r--r--lldb/source/Target/Target.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index d70274a4b7c7..4bac94f35d6c 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2842,14 +2842,9 @@ ExpressionResults Target::EvaluateExpression(
execution_results = eExpressionCompleted;
} else {
llvm::StringRef prefix = GetExpressionPrefixContents();
- Status error;
- execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix,
- result_valobj_sp, error,
- fixed_expression, ctx_obj);
- // Pass up the error by wrapping it inside an error result.
- if (error.Fail() && !result_valobj_sp)
- result_valobj_sp = ValueObjectConstResult::Create(
- exe_ctx.GetBestExecutionContextScope(), std::move(error));
+ execution_results =
+ UserExpression::Evaluate(exe_ctx, options, expr, prefix,
+ result_valobj_sp, fixed_expression, ctx_obj);
}
if (execution_results == eExpressionCompleted)