[llvm-commits] [llvm] r46605 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Christopher Lamb christopher.lamb at gmail.com
Wed Jan 30 23:09:08 PST 2008


Author: clamb
Date: Thu Jan 31 01:09:08 2008
New Revision: 46605

URL: http://llvm.org/viewvc/llvm-project?rev=46605&view=rev
Log:
Add more thorough error checking for NULL register classes.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=46605&r1=46604&r2=46605&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Jan 31 01:09:08 2008
@@ -597,10 +597,11 @@
       // 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);
     }
     





More information about the llvm-commits mailing list