Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[upstreaming] Remove ExecutionContext from GetUserExpressionForLanguage #93

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lldb/include/lldb/Target/Target.h
Original file line number Diff line number Diff line change
Expand Up @@ -1085,8 +1085,7 @@ class Target : public std::enable_shared_from_this<Target>,
// 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,
Expand Down
1 change: 0 additions & 1 deletion lldb/source/Breakpoint/BreakpointLocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 0 additions & 2 deletions lldb/source/Breakpoint/Watchpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Commands/CommandObjectExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Expression/UserExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion lldb/source/Target/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down