aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-04-10 18:58:59 +0000
committerDevang Patel <dpatel@apple.com>2009-04-10 18:58:59 +0000
commit9a72741914cb4717b53f5106f6a06fdd446a63ec (patch)
tree4d8464e8665615d2185a30ecb0c61c1bdccbb79b /lib
parent2e958a4285feeac673a3837ea2fd36bd9402cbcf (diff)
downloadexternal_llvm-9a72741914cb4717b53f5106f6a06fdd446a63ec.zip
external_llvm-9a72741914cb4717b53f5106f6a06fdd446a63ec.tar.gz
external_llvm-9a72741914cb4717b53f5106f6a06fdd446a63ec.tar.bz2
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 4bbc4dd..1d8109e 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/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();