Skip to content

Commit 0899f0e

Browse files
committed
Fix debugify bug?
1 parent 970f9b2 commit 0899f0e

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
@@ -672,6 +672,13 @@ bool llvm::checkDebugInfoMetadata(Module &M,
672672
// again in the collectDebugInfoMetadata(), since as an input we can use
673673
// the debugging information from the previous pass.
674674
DebugInfoBeforePass = DebugInfoAfterPass;
675+
// We should make this conditional on debugify-each, but this has to be done
676+
// if we're reusing DebugInfoAfterPass.
677+
for (const auto &L : DebugInfoBeforePass.DILocations) {
678+
auto Instr = L.first;
679+
DebugInfoBeforePass.InstToDelete.insert(
680+
{const_cast<Instruction *>(Instr), const_cast<Instruction *>(Instr)});
681+
}
675682

676683
LLVM_DEBUG(dbgs() << "\n\n");
677684
return Result;

0 commit comments

Comments
 (0)