A DBG_VALUE that truncates a range does not start another dbg value range.
authorDevang Patel <dpatel@apple.com>
Wed, 1 Jun 2011 23:00:17 +0000 (23:00 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 1 Jun 2011 23:00:17 +0000 (23:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132433 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 0dc5b74fa378abbbb9ab851a5d3bd62c6ad53299..c09c1c558e57aacab401d48a46ea0ef0488606f1 100644 (file)
@@ -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;