Skip to content
Commit 38292f0e authored by OCHyams's avatar OCHyams
Browse files

[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
parent ca7a20df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment