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
This commit is contained in:
Evan Cheng 2008-03-24 23:28:21 +00:00
parent 3e98c30cf5
commit af8c563e11

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;