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 | 342271d198b74e10df0c6132c39994d291ad57a8 (patch) | |
tree | 52e8f4590afd237eee31963466cb9482a009ce97 /lib | |
parent | 1a58880999b841ce474b3eb12e32f2f22ef4fa0c (diff) | |
download | external_llvm-342271d198b74e10df0c6132c39994d291ad57a8.tar.gz external_llvm-342271d198b74e10df0c6132c39994d291ad57a8.tar.bz2 external_llvm-342271d198b74e10df0c6132c39994d291ad57a8.zip |
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')
-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()); - } } } |