diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-04-05 20:44:15 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-04-05 20:44:15 +0000 |
commit | bdaa9dc4a45b8831c942437f726895eb24a956ba (patch) | |
tree | e7c0fe6d1eb32f5fdd2eac7f6c36eaa9616b5eef /lib/CodeGen | |
parent | 06d2b4223ff8e3776d059598a553c08525715311 (diff) | |
download | external_llvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.zip external_llvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.tar.gz external_llvm-bdaa9dc4a45b8831c942437f726895eb24a956ba.tar.bz2 |
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')
-rw-r--r-- | lib/CodeGen/RegisterScavenging.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/RegisterScavenging.cpp b/lib/CodeGen/RegisterScavenging.cpp index b9dd28e..ebfe533 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; |