[Lldb-commits] [lldb] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 5 15:42:03 PDT 2024


================
@@ -669,15 +670,8 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager,
   // Parse the expression
   //
 
-  Process *process = exe_ctx.GetProcessPtr();
-  ExecutionContextScope *exe_scope = process;
-
-  if (!exe_scope)
-    exe_scope = exe_ctx.GetTargetPtr();
-
-  bool parse_success = TryParse(diagnostic_manager, exe_scope, exe_ctx,
-                                execution_policy, keep_result_in_memory,
-                                generate_debug_info);
+  bool parse_success = TryParse(diagnostic_manager, exe_ctx, execution_policy,
+                                keep_result_in_memory, generate_debug_info);
----------------
Michael137 wrote:

@clayborg Any remaining concerns with landing this as-is? It seems like we want to have a separate discussion around which one of `ExecutionContextScope` or `ExecutionContext` to use in APIs, orthogonal to this patch.

https://github.com/llvm/llvm-project/pull/87657


More information about the lldb-commits mailing list