aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-09-29 16:25:54 +0000
committerDuncan Sands <baldrick@free.fr>2007-09-29 16:25:54 +0000
commitf51edadfe82069a2bb8be6f4968a921833b9eea4 (patch)
treec227d8cb77e37b77e9d6b73ec83a96baacb883e4 /lib
parent078f5e1875deb4fa25961d579bc6ef511887ad57 (diff)
downloadexternal_llvm-f51edadfe82069a2bb8be6f4968a921833b9eea4.zip
external_llvm-f51edadfe82069a2bb8be6f4968a921833b9eea4.tar.gz
external_llvm-f51edadfe82069a2bb8be6f4968a921833b9eea4.tar.bz2
Check that the second parameter of init_trampoline
can be resolved to a function. This is required for codegen and used by instcombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Verifier.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 447b884..000fa6b 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1111,8 +1111,8 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
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 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
"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);
}
}