diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h index 7d2428fb4af647f..1ee0a0f734ae294 100644 --- a/lldb/include/lldb/Target/Target.h +++ b/lldb/include/lldb/Target/Target.h @@ -1085,8 +1085,7 @@ class Target : public std::enable_shared_from_this, // Returns a new-ed object which the caller owns. UserExpression * - GetUserExpressionForLanguage(ExecutionContext &exe_ctx, - llvm::StringRef expr, llvm::StringRef prefix, + GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp index e0a5294c4fa4ebe..46b8f25c5668254 100644 --- a/lldb/source/Breakpoint/BreakpointLocation.cpp +++ b/lldb/source/Breakpoint/BreakpointLocation.cpp @@ -254,7 +254,6 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx, language = comp_unit->GetLanguage(); m_user_expression_sp.reset(GetTarget().GetUserExpressionForLanguage( - exe_ctx, condition_text, llvm::StringRef(), language, Expression::eResultTypeAny, EvaluateExpressionOptions(), nullptr, error)); if (error.Fail()) { diff --git a/lldb/source/Breakpoint/Watchpoint.cpp b/lldb/source/Breakpoint/Watchpoint.cpp index 2bfd28ab3067beb..17dcda13e9b9292 100644 --- a/lldb/source/Breakpoint/Watchpoint.cpp +++ b/lldb/source/Breakpoint/Watchpoint.cpp @@ -286,9 +286,7 @@ void Watchpoint::SetCondition(const char *condition) { } else { // Pass nullptr for expr_prefix (no translation-unit level definitions). Status error; - ExecutionContext exe_scope(m_target); m_condition_up.reset(m_target.GetUserExpressionForLanguage( - exe_scope, condition, llvm::StringRef(), lldb::eLanguageTypeUnknown, UserExpression::eResultTypeAny, EvaluateExpressionOptions(), nullptr, error)); diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index b23cfc7a0d6576f..e3f37293837bb13 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -348,7 +348,7 @@ void CommandObjectExpression::HandleCompletion(CompletionRequest &request) { auto language = exe_ctx.GetFrameRef().GetLanguage(); Status error; - lldb::UserExpressionSP expr(target->GetUserExpressionForLanguage(exe_ctx, + lldb::UserExpressionSP expr(target->GetUserExpressionForLanguage( code, llvm::StringRef(), language, UserExpression::eResultTypeAny, options, nullptr, error)); if (error.Fail()) diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index 6c5682bdc38a0f2..c369c4c5749fcbd 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -230,7 +230,7 @@ lldb::ExpressionResults UserExpression::Evaluate( } lldb::UserExpressionSP user_expression_sp( - target->GetUserExpressionForLanguage(exe_ctx, expr, full_prefix, language, + target->GetUserExpressionForLanguage(expr, full_prefix, language, desired_type, options, ctx_obj, error)); if (error.Fail()) { @@ -280,8 +280,7 @@ lldb::ExpressionResults UserExpression::Evaluate( user_expression_sp = nullptr; lldb::UserExpressionSP fixed_expression_sp( - target->GetUserExpressionForLanguage(exe_ctx, - fixed_expression->c_str(), + target->GetUserExpressionForLanguage(fixed_expression->c_str(), full_prefix, language, desired_type, options, ctx_obj, error)); diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 9a0c0828206a01e..cfcf0334328ec56 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -2322,7 +2322,6 @@ Target::GetSwiftPersistentExpressionState(ExecutionContextScope &exe_scope) { } UserExpression *Target::GetUserExpressionForLanguage( - ExecutionContext &exe_ctx, llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, Expression::ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj,