[llvm-branch-commits] [llvm] [Dexter] Add !address node (PR #202801)
Stephen Tozer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 24 03:52:43 PDT 2026
================
@@ -67,12 +104,21 @@ class DebuggerExpectMatch:
`actual_result` is None if either `actual` or `expect.get_variable_result(actual)` is None,
Otherwise, if `expected` is a dict, then `actual_result` is a dict[str, DebuggerExpectMatch],
Otherwise, `actual_result` is a str.
+ Uses the provided match_context, and updates a local copy of it; if this match is selected, then its local updated
+ match_context should be committed.
"""
- def __init__(self, expect: Expect, expected, actual: Optional[ValueIR]):
+ def __init__(
+ self,
+ expect: Expect,
+ expected,
+ actual: Optional[ValueIR],
+ match_context: ExpectMatchContext,
+ ):
self.expect = expect
self.expected = expected
self.actual = actual
+ self.match_context = copy.deepcopy(match_context)
----------------
SLTozer wrote:
I think it does represent a "context" in that sense, it is shared state across the whole trace, but only one is actually active at any one time. The local copy represents a revision based on this evaluation, when the current evaluation may not become the "canonical" evaluation - so in any given evaluation we can treat the copy as if it's _the_ context, and if we select that evaluation then we commit any changes made. I'll change the names and add a comment to make this more explicit, and see if that makes the naming convention suitable.
https://github.com/llvm/llvm-project/pull/202801
More information about the llvm-branch-commits
mailing list