Start TargetRegisterClass indices at 0 instead of 1, so that
[oota-llvm.git] / lib / CodeGen / Spiller.cpp
index 735ca316fa4323ad39b7892bf9659abff1c51194..a7b2efe118252ff8cfc998eae7c93d6b1453b486 100644 (file)
@@ -451,9 +451,9 @@ private:
         // reg.
         MachineBasicBlock *useMBB = useInst->getParent();
         MachineBasicBlock::iterator useItr(useInst);
-        tii->copyRegToReg(*useMBB, next(useItr), li->reg, newVReg, trc, trc,
+        tii->copyRegToReg(*useMBB, llvm::next(useItr), li->reg, newVReg, trc, trc,
                           DebugLoc());
-        MachineInstr *copyMI = next(useItr);
+        MachineInstr *copyMI = llvm::next(useItr);
         copyMI->addRegisterKilled(newVReg, tri);
         SlotIndex copyIdx = lis->InsertMachineInstrInMaps(copyMI);