[llvm-commits] [llvm] r42469 - /llvm/trunk/lib/VMCore/Verifier.cpp

Duncan Sands baldrick at free.fr
Sat Sep 29 09:25:56 PDT 2007


Author: baldrick
Date: Sat Sep 29 11:25:54 2007
New Revision: 42469

URL: http://llvm.org/viewvc/llvm-project?rev=42469&view=rev
Log:
Check that the second parameter of init_trampoline
can be resolved to a function.  This is required
for codegen and used by instcombine.

Modified:
    llvm/trunk/lib/VMCore/Verifier.cpp

Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=42469&r1=42468&r2=42469&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sat Sep 29 11:25:54 2007
@@ -1111,8 +1111,8 @@
     break;
   case Intrinsic::gcwrite:
     Assert1(CI.getOperand(3)->getType()
-              == PointerType::get(CI.getOperand(1)->getType()),
-          "Call to llvm.gcwrite must be with type 'void (%ty*, %ty2*, %ty**)'.",
+            == PointerType::get(CI.getOperand(1)->getType()),
+            "Call to llvm.gcwrite must be with type 'void (%ty*, %ty2*, %ty**)'.",
             &CI);
     break;
   case Intrinsic::gcread:
@@ -1120,6 +1120,10 @@
             "Call to llvm.gcread must be with type '%ty* (%ty2*, %ty**).'",
             &CI);
     break;
+  case Intrinsic::init_trampoline:
+    Assert1(isa<Function>(IntrinsicInst::StripPointerCasts(CI.getOperand(2))),
+            "llvm.init_trampoline parameter #2 must resolve to a function.",
+            &CI);
   }
 }
 





More information about the llvm-commits mailing list