Skip to content

Commit b54ea1f

Browse files
committed
Fix debugify bug?
1 parent 2e33828 commit b54ea1f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/Transforms/Utils/Debugify.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,13 @@ bool llvm::checkDebugInfoMetadata(Module &M,
665665
// again in the collectDebugInfoMetadata(), since as an input we can use
666666
// the debugging information from the previous pass.
667667
DebugInfoBeforePass = DebugInfoAfterPass;
668+
// We should make this conditional on debugify-each, but this has to be done
669+
// if we're reusing DebugInfoAfterPass.
670+
for (const auto &L : DebugInfoBeforePass.DILocations) {
671+
auto Instr = L.first;
672+
DebugInfoBeforePass.InstToDelete.insert(
673+
{const_cast<Instruction *>(Instr), const_cast<Instruction *>(Instr)});
674+
}
668675

669676
LLVM_DEBUG(dbgs() << "\n\n");
670677
return Result;

0 commit comments

Comments
 (0)