diff options
| author | Christopher Lamb <christopher.lamb@gmail.com> | 2008-01-31 07:09:08 +0000 | 
|---|---|---|
| committer | Christopher Lamb <christopher.lamb@gmail.com> | 2008-01-31 07:09:08 +0000 | 
| commit | 58ffa8c57a3b8a2b60a1cf0de0165b85f2116a05 (patch) | |
| tree | dc45d2c72cd15337437e5dbe233e64840d253f7c /llvm/lib | |
| parent | 6f4a9ef4b60495105cea58f042cc2d0bcb6a4f5e (diff) | |
| download | bcm5719-llvm-58ffa8c57a3b8a2b60a1cf0de0165b85f2116a05.tar.gz bcm5719-llvm-58ffa8c57a3b8a2b60a1cf0de0165b85f2116a05.zip  | |
Add more thorough error checking for NULL register classes.
llvm-svn: 46605
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 37beff96191..c9fc812259a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/llvm/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);      }  | 

