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 | fa4120530ec16b3c3e80c42c3e025c1f4835912f (patch) | |
tree | d4ae30e56c8e34c4774897207726835001c60b22 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 2a24157364624b8018bcbae98cf569279061be0c (diff) | |
download | bcm5719-llvm-fa4120530ec16b3c3e80c42c3e025c1f4835912f.tar.gz bcm5719-llvm-fa4120530ec16b3c3e80c42c3e025c1f4835912f.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.
llvm-svn: 54172
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index f6b3d9cada5..00d927a77a2 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/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()); - } } } |