Skip to content

Commit 86904c2

Browse files
authored
Merge pull request #126 from Teemperor/RemoveExeCtxFromGetUserExprNext
[upstreaming] Remove ExecutionContext from GetUserExpressionForLanguage
2 parents 73514c1 + 0baf305 commit 86904c2

File tree

6 files changed

+3
-18
lines changed

6 files changed

+3
-18
lines changed

lldb/include/lldb/Target/Target.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,7 @@ class Target : public std::enable_shared_from_this<Target>,
10851085
// Returns a new-ed object which the caller owns.
10861086

10871087
UserExpression *
1088-
GetUserExpressionForLanguage(ExecutionContext &exe_ctx,
1089-
llvm::StringRef expr, llvm::StringRef prefix,
1088+
GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
10901089
lldb::LanguageType language,
10911090
Expression::ResultType desired_type,
10921091
const EvaluateExpressionOptions &options,

lldb/source/Breakpoint/BreakpointLocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,6 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx,
254254
language = comp_unit->GetLanguage();
255255

256256
m_user_expression_sp.reset(GetTarget().GetUserExpressionForLanguage(
257-
// BEGIN SWIFT
258-
exe_ctx,
259-
// END SWIFT
260257
condition_text, llvm::StringRef(), language, Expression::eResultTypeAny,
261258
EvaluateExpressionOptions(), nullptr, error));
262259
if (error.Fail()) {

lldb/source/Breakpoint/Watchpoint.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,7 @@ void Watchpoint::SetCondition(const char *condition) {
286286
} else {
287287
// Pass nullptr for expr_prefix (no translation-unit level definitions).
288288
Status error;
289-
// BEGIN SWIFT
290-
ExecutionContext exe_scope(m_target);
291-
// END SWIFT
292289
m_condition_up.reset(m_target.GetUserExpressionForLanguage(
293-
// BEGIN SWIFT
294-
exe_scope,
295-
// END SWIFT
296290
condition, llvm::StringRef(), lldb::eLanguageTypeUnknown,
297291
UserExpression::eResultTypeAny, EvaluateExpressionOptions(), nullptr,
298292
error));

lldb/source/Commands/CommandObjectExpression.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,6 @@ void CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
353353

354354
Status error;
355355
lldb::UserExpressionSP expr(target->GetUserExpressionForLanguage(
356-
// BEGIN SWIFT
357-
exe_ctx,
358-
// END SWIFT
359356
code, llvm::StringRef(), language, UserExpression::eResultTypeAny,
360357
options, nullptr, error));
361358
if (error.Fail())

lldb/source/Expression/UserExpression.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ lldb::ExpressionResults UserExpression::Evaluate(
230230
}
231231

232232
lldb::UserExpressionSP user_expression_sp(
233-
target->GetUserExpressionForLanguage(exe_ctx, expr, full_prefix, language,
233+
target->GetUserExpressionForLanguage(expr, full_prefix, language,
234234
desired_type, options, ctx_obj,
235235
error));
236236
if (error.Fail()) {
@@ -280,8 +280,7 @@ lldb::ExpressionResults UserExpression::Evaluate(
280280
user_expression_sp = nullptr;
281281

282282
lldb::UserExpressionSP fixed_expression_sp(
283-
target->GetUserExpressionForLanguage(exe_ctx,
284-
fixed_expression->c_str(),
283+
target->GetUserExpressionForLanguage(fixed_expression->c_str(),
285284
full_prefix, language,
286285
desired_type, options, ctx_obj,
287286
error));

lldb/source/Target/Target.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,6 @@ Target::GetSwiftPersistentExpressionState(ExecutionContextScope &exe_scope) {
23182318
}
23192319

23202320
UserExpression *Target::GetUserExpressionForLanguage(
2321-
ExecutionContext &exe_ctx,
23222321
llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
23232322
Expression::ResultType desired_type,
23242323
const EvaluateExpressionOptions &options, ValueObject *ctx_obj,

0 commit comments

Comments
 (0)