search for: opinst

Displaying 1 result from an estimated 1 matches for "opinst".

Did you mean: oinst
2018 Apr 04
1
Call printf with new args
...rtBlock()->getParent()->getParent(); FunctionType *printfType = FunctionType::get(B.getInt32Ty(), params, true); Constant* const_printf = M->getOrInsertFunction("printf", printfType); Function *F = cast<Function>(const_printf); F->dump(); CallInst * opInst = B.CreateCall(F, args, "call"); It crashes with: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || F...