[Assignment Tracking] Fix assertion in AssignmentTrackingPass::runOnFunction
The assertion exists to ensure all variables passed into `trackAssignments` end up with dbg.assigns associated with their backing allocas. The assertion compared the passed-in and tracked variables using `DebugVariable`, which includes the fragment as part of the variable identity. It is possible for the backing alloca to be smaller than a variable (see test case). In this case the input variable `(Var X, no fragment, no InlinedAt)` isn't equal to the dbg.assign variable `(Var X, some fragment, no InlinedAt)`. To cover this case the assertion now ignores fragments through the use of `DebugVariableAggregate`. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D148100
Loading
Please sign in to comment