[llvm-commits] [llvm] r128925 - /llvm/trunk/lib/CodeGen/RegisterScavenging.cpp

Bob Wilson bob.wilson at apple.com
Tue Apr 5 13:44:15 PDT 2011


Author: bwilson
Date: Tue Apr  5 15:44:15 2011
New Revision: 128925

URL: http://llvm.org/viewvc/llvm-project?rev=128925&view=rev
Log:
Add an assertion instead of crashing when the scavenger goes past the end
of a basic block.

Modified:
    llvm/trunk/lib/CodeGen/RegisterScavenging.cpp

Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=128925&r1=128924&r2=128925&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Tue Apr  5 15:44:15 2011
@@ -126,9 +126,10 @@
     MBBI = MBB->begin();
     Tracking = true;
   } else {
-    assert(MBBI != MBB->end() && "Already at the end of the basic block!");
+    assert(MBBI != MBB->end() && "Already past the end of the basic block!");
     MBBI = llvm::next(MBBI);
   }
+  assert(MBBI != MBB->end() && "Already at the end of the basic block!");
 
   MachineInstr *MI = MBBI;
 





More information about the llvm-commits mailing list