diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:28:21 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-24 23:28:21 +0000 |
commit | af8c563e11a9efd848bd5402819e0649883a777d (patch) | |
tree | 5f3cd494e1a088b4bf70d3a198ce2f1ed5f4c531 /lib/CodeGen | |
parent | 3e98c30cf5dd450879c0b9d6404353b02e2429c3 (diff) | |
download | external_llvm-af8c563e11a9efd848bd5402819e0649883a777d.zip external_llvm-af8c563e11a9efd848bd5402819e0649883a777d.tar.gz external_llvm-af8c563e11a9efd848bd5402819e0649883a777d.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/CodeGen')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 1 |
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; |