summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-04 22:07:27 +0000
committerDevang Patel <dpatel@apple.com>2010-08-04 22:07:27 +0000
commit6c378ac47369b1278bb0f09d0030635072762a52 (patch)
treef2b6923dfb42d950d5fe0a6f3fd6451fad23dc02 /llvm/lib
parent49af1ebf2ec05f34f2e4e990db51f460da7c801f (diff)
downloadbcm5719-llvm-6c378ac47369b1278bb0f09d0030635072762a52.tar.gz
bcm5719-llvm-6c378ac47369b1278bb0f09d0030635072762a52.zip
Use location entry only of the location described by DBG_VALUE is valid.
llvm-svn: 110255
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index ac58f7a6bd5..1b84442181b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2315,7 +2315,9 @@ DwarfDebug::collectVariableInfo(const MachineFunction *MF,
const MCSymbol *FLabel = getLabelBeforeInsn(Begin);
const MCSymbol *SLabel = getLabelBeforeInsn(End);
- DotDebugLocEntries.push_back(DotDebugLocEntry(FLabel, SLabel, MLoc));
+ if (MLoc.getReg())
+ DotDebugLocEntries.push_back(DotDebugLocEntry(FLabel, SLabel, MLoc));
+
Begin = End;
if (MVI + 1 == MVE) {
// If End is the last instruction then its value is valid
@@ -2326,8 +2328,9 @@ DwarfDebug::collectVariableInfo(const MachineFunction *MF,
EMLoc.set(Begin->getOperand(0).getReg(), Begin->getOperand(1).getImm());
} else
EMLoc = Asm->getDebugValueLocation(End);
- DotDebugLocEntries.
- push_back(DotDebugLocEntry(SLabel, FunctionEndSym, EMLoc));
+ if (EMLoc.getReg())
+ DotDebugLocEntries.
+ push_back(DotDebugLocEntry(SLabel, FunctionEndSym, EMLoc));
}
}
DotDebugLocEntries.push_back(DotDebugLocEntry());
OpenPOWER on IntegriCloud