File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -538,17 +538,20 @@ Value *Mapper::mapValue(const Value *V) {
538
538
}
539
539
540
540
void Mapper::remapDbgRecord (DbgRecord &DR) {
541
+ // Remap DILocations.
542
+ auto *MappedDILoc = mapMetadata (DR.getDebugLoc ());
543
+ DR.setDebugLoc (DebugLoc (cast<DILocation>(MappedDILoc)));
544
+
541
545
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
546
+ // Remap labels.
542
547
DLR->setLabel (cast<DILabel>(mapMetadata (DLR->getLabel ())));
543
548
return ;
544
549
}
545
550
546
551
DbgVariableRecord &V = cast<DbgVariableRecord>(DR);
547
- // Remap variables and DILocations .
552
+ // Remap variables.
548
553
auto *MappedVar = mapMetadata (V.getVariable ());
549
- auto *MappedDILoc = mapMetadata (V.getDebugLoc ());
550
554
V.setVariable (cast<DILocalVariable>(MappedVar));
551
- V.setDebugLoc (DebugLoc (cast<DILocation>(MappedDILoc)));
552
555
553
556
bool IgnoreMissingLocals = Flags & RF_IgnoreMissingLocals;
554
557
You can’t perform that action at this time.
0 commit comments