Add an assertion to catch register of illegal class.

llvm-svn: 48751
This commit is contained in:
Evan Cheng 2008-03-24 23:28:21 +00:00
parent 6306183df3
commit 6e225173c5
1 changed files with 1 additions and 0 deletions

View File

@ -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;