From af8c563e11a9efd848bd5402819e0649883a777d Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 24 Mar 2008 23:28:21 +0000 Subject: [PATCH] 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 --- lib/CodeGen/RegAllocLinearScan.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 2713771ceb2..6925de3abf1 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; -- 2.34.1