From eabc3cea33b614fc8a40e5afc12861bc130b3dec Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 4 Aug 2011 20:42:11 +0000 Subject: Increment counter inside insertDebugValue(). llvm-svn: 136915 --- llvm/lib/CodeGen/LiveDebugVariables.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp') diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 096c47fac96..7174bddfb51 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -896,6 +896,7 @@ void UserValue::insertDebugValue(MachineBasicBlock *MBB, SlotIndex Idx, const TargetInstrInfo &TII) { MachineBasicBlock::iterator I = findInsertLocation(MBB, Idx, LIS); MachineOperand &Loc = locations[LocNo]; + ++NumInsertedDebugValues; // Frame index locations may require a target callback. if (Loc.isFI()) { @@ -926,7 +927,6 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS, DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd); insertDebugValue(MBB, Start, LocNo, LIS, TII); - ++NumInsertedDebugValues; // This interval may span multiple basic blocks. // Insert a DBG_VALUE into each one. while(Stop > MBBEnd) { @@ -937,7 +937,6 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS, MBBEnd = LIS.getMBBEndIdx(MBB); DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd); insertDebugValue(MBB, Start, LocNo, LIS, TII); - ++NumInsertedDebugValues; } DEBUG(dbgs() << '\n'); if (MBB == MFEnd) -- cgit v1.2.3