From e7181b5fdb590c90ec1f559b148d3aa2d546a320 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 1 Jun 2011 23:00:17 +0000 Subject: A DBG_VALUE that truncates a range does not start another dbg value range. llvm-svn: 132433 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0dc5b74fa37..c09c1c558e5 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1411,6 +1411,11 @@ DwarfDebug::collectVariableInfo(const MachineFunction *MF, const MachineInstr *Begin = *HI; assert(Begin->isDebugValue() && "Invalid History entry"); + // Check if DBG_VALUE is truncating a range. + if (Begin->getNumOperands() > 1 && Begin->getOperand(0).isReg() + && !Begin->getOperand(0).getReg()) + continue; + // Compute the range for a register location. const MCSymbol *FLabel = getLabelBeforeInsn(Begin); const MCSymbol *SLabel = 0; -- cgit v1.2.3