summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegisterScavenging.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-04-05 20:44:15 +0000
committerBob Wilson <bob.wilson@apple.com>2011-04-05 20:44:15 +0000
commitbdaa9dc4a45b8831c942437f726895eb24a956ba (patch)
treee7c0fe6d1eb32f5fdd2eac7f6c36eaa9616b5eef /lib/CodeGen/RegisterScavenging.cpp
parent06d2b4223ff8e3776d059598a553c08525715311 (diff)
downloadllvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.tar.gz
llvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.tar.bz2
llvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.tar.xz
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
Diffstat (limited to 'lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r--lib/CodeGen/RegisterScavenging.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp
index b9dd28e5c7..ebfe533838 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;