From 7976eb58382b25d0e17490b9d77fb06cb000c95b Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Fri, 1 Feb 2019 20:43:25 +0000 Subject: [opaque pointer types] Pass function types to CallInst creation. This cleans up all CallInst creation in LLVM to explicitly pass a function type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57170 llvm-svn: 352909 --- llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp') diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp index e2ef4e0a81c..884a18751e0 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp @@ -262,7 +262,7 @@ bool FixFunctionBitcasts::runOnModule(Module &M) { UndefValue::get(MainArgTys[1])}; Value *Casted = ConstantExpr::getBitCast(Main, PointerType::get(MainTy, 0)); - CallMain = CallInst::Create(Casted, Args, "call_main"); + CallMain = CallInst::Create(MainTy, Casted, Args, "call_main"); Use *UseMain = &CallMain->getOperandUse(2); Uses.push_back(std::make_pair(UseMain, &F)); } -- cgit v1.2.3