[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

John Criswell criswell at cs.uiuc.edu
Wed Apr 14 10:08:01 PDT 2004


Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.94 -> 1.95

---
Log message:

Remove the return type check for llvm.readio.  This check is done for all
functions and is not needed here.
Simplify the pointer type check per Chris's suggestions.



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

Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.94 llvm/lib/VMCore/Verifier.cpp:1.95
--- llvm/lib/VMCore/Verifier.cpp:1.94	Wed Apr 14 09:49:36 2004
+++ llvm/lib/VMCore/Verifier.cpp	Wed Apr 14 10:06:48 2004
@@ -644,11 +644,10 @@
 
     Assert1(FT->getNumParams() == 1,
             "Illegal # arguments for intrinsic function!", IF);
-    Assert1(ReturnType->isFirstClassType(),
-            "Return type is not a first class type!", IF);
-    Assert1(ParamType->getPrimitiveID() == Type::PointerTyID,
+    Assert1(isa<PointerType>(ParamType),
             "First argument not a pointer!", IF);
-    Assert1(((dyn_cast<PointerType>(ParamType)->getContainedType(0)) == ReturnType), "Pointer type doesn't match return type!", IF);
+    Assert1(((cast<PointerType>(ParamType)->getElementType()) == ReturnType),
+            "Pointer type doesn't match return type!", IF);
     NumArgs = 1;
     break;
   }





More information about the llvm-commits mailing list