summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit6c20b88173041e58d5021d47870ba100e14bb51d (patch)
tree0723bb82ad451673f0048c9619dfbf9d12c57148 /llvm/lib/CodeGen/RegisterScavenging.cpp
parentee54fa29d57be6194af77adce9be8d32308d7bac (diff)
downloadbcm5719-llvm-6c20b88173041e58d5021d47870ba100e14bb51d.tar.gz
bcm5719-llvm-6c20b88173041e58d5021d47870ba100e14bb51d.zip
Add an assertion instead of crashing when the scavenger goes past the end
of a basic block. llvm-svn: 128925
Diffstat (limited to 'llvm/lib/CodeGen/RegisterScavenging.cpp')
-rw-r--r--llvm/lib/CodeGen/RegisterScavenging.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index b9dd28e5c78..ebfe533838d 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud