diff options
author | Duncan Sands <baldrick@free.fr> | 2008-07-29 20:56:02 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-07-29 20:56:02 +0000 |
commit | 68d4d1d49c813d10047ad116e897a17d67112c10 (patch) | |
tree | 52e8f4590afd237eee31963466cb9482a009ce97 /lib/CodeGen/BranchFolding.cpp | |
parent | 97843cdb0b63735a4ade07cf7270c9a2198e0dc7 (diff) |
Fix PR2609. If a label is deleted, then it needs
to be marked invalid regardless of whether it is
a debug, an exception handling or (hopefully) a
GC label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index f6b3d9cada..00d927a77a 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -114,15 +114,14 @@ void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { while (!MBB->succ_empty()) MBB->removeSuccessor(MBB->succ_end()-1); - // If there is DWARF info to active, check to see if there are any DBG_LABEL - // records in the basic block. If so, unregister them from MachineModuleInfo. + // If there are any labels in the basic block, unregister them from + // MachineModuleInfo. if (MMI && !MBB->empty()) { for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); I != E; ++I) { - if ((unsigned)I->getOpcode() == TargetInstrInfo::DBG_LABEL) { + if (I->isLabel()) // The label ID # is always operand #0, an immediate. MMI->InvalidateLabel(I->getOperand(0).getImm()); - } } } |