From: Bob Wilson Date: Tue, 5 Apr 2011 20:44:15 +0000 (+0000) Subject: Add an assertion instead of crashing when the scavenger goes past the end X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=bdaa9dc4a45b8831c942437f726895eb24a956ba;p=oota-llvm.git Add an assertion instead of crashing when the scavenger goes past the end of a basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128925 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index b9dd28e5c78..ebfe533838d 100644 --- a/lib/CodeGen/RegisterScavenging.cpp +++ b/lib/CodeGen/RegisterScavenging.cpp @@ -126,9 +126,10 @@ void RegScavenger::forward() { 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;