[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Duncan Sands baldrick at free.fr
Fri Jun 1 01:18:52 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.454 -> 1.455
---
Log message:

Since TypeInfos are passed as i8 pointers, a NULL TypeInfo should be passed
as a null i8 pointer not as a 0 i32.


---
Diffs of the changes:  (+2 -4)

 SelectionDAGISel.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.454 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.455
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.454	Thu May 24 09:36:04 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Fri Jun  1 03:18:30 2007
@@ -2620,8 +2620,7 @@
       for (unsigned i = 3, N = I.getNumOperands(); i < N; ++i) {
         Constant *C = cast<Constant>(I.getOperand(i));
         GlobalVariable *GV = ExtractGlobalVariable(C);
-        assert (GV || (isa<ConstantInt>(C) &&
-                       cast<ConstantInt>(C)->isNullValue()) &&
+        assert (GV || isa<ConstantPointerNull>(C) &&
                 "TypeInfo must be a global variable or NULL");
         TyInfo.push_back(GV);
       }
@@ -2653,8 +2652,7 @@
       // Find the type id for the given typeinfo.
       Constant *C = cast<Constant>(I.getOperand(1));
       GlobalVariable *GV = ExtractGlobalVariable(C);
-      assert (GV || (isa<ConstantInt>(C) &&
-                     cast<ConstantInt>(C)->isNullValue()) &&
+      assert (GV || isa<ConstantPointerNull>(C) &&
               "TypeInfo must be a global variable or NULL");
 
       unsigned TypeID = MMI->getTypeIDFor(GV);






More information about the llvm-commits mailing list