[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
eli.friedman at gmail.com
Wed Jun 24 19:18:23 CDT 2009
On Thu, Jun 25, 2009 at 12:32 AM, ihusar<ihusar at fit.vutbr.cz> wrote:
> //now i need to create an instruction that represents a call to a intrinsic
> Function* FIntr = Intrinsic::getDeclaration(&M, Intrinsic::regread_i32);
> // here it fails: void llvm::CallInst::init(llvm::Value*):
> //Assertion `FTy->getNumParams() == 0 && "Calling a function with bad signature"' failed.
> Instruction* Instr = CallInst::Create(FIntr);
You have to include the operands in the call to CallInst::Create.
More information about the LLVMdev