aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2008-01-31 07:09:08 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2008-01-31 07:09:08 +0000
commit175e81598ad3fc02f9f5a2ac3ef578a9fed31b6e (patch)
treedb344f11908bea462d058a7bc52846df254006b9 /lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
parentc67aa7cbd507eb0ecf65724dd22a1bc968a2a549 (diff)
Add more thorough error checking for NULL register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 37beff9619..c9fc812259 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -597,10 +597,11 @@ void ScheduleDAG::EmitSubregNode(SDNode *Node,
// Grab the destination register
const TargetRegisterClass *DRC = 0;
DRC = RegInfo.getRegClass(VRBase);
- assert(SRC == DRC &&
+ assert(SRC && DRC && SRC == DRC &&
"Source subregister and destination must have the same class");
} else {
// Create the reg
+ assert(SRC && "Couldn't find source register class");
VRBase = RegInfo.createVirtualRegister(SRC);
}