Reapply 91184 with fixes and an addition to the testcase to cover the problem
[oota-llvm.git] / lib / CodeGen / RegisterScavenging.cpp
index 94680ed29921605d5cdd234abe41959885b2beec..67bf209c73250ab44ef32f98d0682d95f9379304 100644 (file)
@@ -125,7 +125,7 @@ void RegScavenger::forward() {
     Tracking = true;
   } else {
     assert(MBBI != MBB->end() && "Already at the end of the basic block!");
-    MBBI = next(MBBI);
+    MBBI = llvm::next(MBBI);
   }
 
   MachineInstr *MI = MBBI;