Remove assert(false) in favor of asserting the if conditional it is contained within.
[oota-llvm.git] / lib / CodeGen / RegAllocFast.cpp
index 2ccee62faef92d24970e16e0b5c667112c33aa69..f4c076fea0e706de84204e2afae6fa8daaa770bd 100644 (file)
@@ -799,9 +799,9 @@ void RAFast::AllocateBasicBlock() {
   MachineBasicBlock::iterator MII = MBB->begin();
 
   // Add live-in registers as live.
-  for (unsigned LI : MBB->liveins())
-    if (MRI->isAllocatable(LI))
-      definePhysReg(MII, LI, regReserved);
+  for (const auto &LI : MBB->liveins())
+    if (MRI->isAllocatable(LI.PhysReg))
+      definePhysReg(MII, LI.PhysReg, regReserved);
 
   SmallVector<unsigned, 8> VirtDead;
   SmallVector<MachineInstr*, 32> Coalesced;