diff options
author | Devang Patel <dpatel@apple.com> | 2009-04-10 18:58:59 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-04-10 18:58:59 +0000 |
commit | 61b35cd15e448b088cf2915aae1931de492978bf (patch) | |
tree | bd9330bbbe67433df6656b40db9f543cf94366df /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 67645930985e59e0735b7798f207f608e8eda688 (diff) | |
download | bcm5719-llvm-61b35cd15e448b088cf2915aae1931de492978bf.tar.gz bcm5719-llvm-61b35cd15e448b088cf2915aae1931de492978bf.zip |
DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used.
llvm-svn: 68813
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 4bbc4dd985a..1d8109eb8d9 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -333,7 +333,7 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) { // Iterate through instructions. for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) { // Is it a label. - if (I->isDebugLabel()) { + if (I->isDebugLabel() && !MMI->isDbgLabelUsed(I->getOperand(0).getImm())){ // The label ID # is always operand #0, an immediate. unsigned NextLabel = I->getOperand(0).getImm(); |