You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DLCov][NFC] Propagate annotated DebugLocs through transformations
In order for DebugLoc coverage testing to work, we have to firstly set
annotations for intentionally-empty DebugLocs, and secondly we have to
ensure that we do not drop these annotations as we propagate DebugLocs
through the compiler. As the annotations exist as part of the DebugLoc
class, and not DILocation, they will not survive a
DebugLoc->DILocation->DebugLoc roundtrip. Therefore this patch modifies
a number of places in the compiler to propagate DebugLocs directly rather
than via the underlying DILocation. This has no effect on normal builds; it
only ensures that during coverage builds, we do not drop annotations and
therefore create false positives.
The bulk of these changes are in replacing DILocation::getMergedLocation(s)
with a DebugLoc equivalent, and in changing the IRBuilder to store a
DebugLoc directly rather than storing DILocations in its general Metadata
array.
0 commit comments