diff options
author | Devang Patel <dpatel@apple.com> | 2010-08-04 22:07:27 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-08-04 22:07:27 +0000 |
commit | 5573a7da298e68db9e63307b766dd650f044287e (patch) | |
tree | 10c87816eeae8fef38abe4eb498c41b605ba0355 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 009944e7746444ba599c5c908f00551730bc0120 (diff) |
Use location entry only of the location described by DBG_VALUE is valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index ac58f7a6bd..1b84442181 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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()); |