aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-24 23:28:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-24 23:28:21 +0000
commitaf091bdebb11e275b620a7638533fbd1ed388b10 (patch)
tree5f3cd494e1a088b4bf70d3a198ce2f1ed5f4c531 /lib
parenta77e9f0453ee449a486019e9de21f8ebd1e74efe (diff)
downloadexternal_llvm-af091bdebb11e275b620a7638533fbd1ed388b10.zip
external_llvm-af091bdebb11e275b620a7638533fbd1ed388b10.tar.gz
external_llvm-af091bdebb11e275b620a7638533fbd1ed388b10.tar.bz2
Add an assertion to catch register of illegal class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/RegAllocLinearScan.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp
index 2713771..6925de3 100644
--- a/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/lib/CodeGen/RegAllocLinearScan.cpp
@@ -886,6 +886,7 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) {
// Scan for the first available register.
TargetRegisterClass::iterator I = RC->allocation_order_begin(*mf_);
TargetRegisterClass::iterator E = RC->allocation_order_end(*mf_);
+ assert(I != E && "No allocatable register in this register class!");
for (; I != E; ++I)
if (prt_->isRegAvail(*I)) {
FreeReg = *I;