search for: foofunctionptr

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

2015 Mar 24
2
[LLVMdev] IR blocks for calling function pointers
...uot;(void) *foo_ptr (int)"). In C code, I would just call "foo_ptr(var)", and it would just work. But, replacing the function name with the name of the function pointer, in the IRBlock does not work: std::vector<Type*> FooArgs; FooArgs.push_back(IRB.getInt64Ty()); Value *FooFunctionPtr = M.getOrInsertFunction(std::string("foo_ptr"), FunctionType::get(IRB.getVoidTy(), ArrayRef<Type*>(FooArgs), false)); IRB.CreateCall(FooFunctionPtr, IRB.CreateLoad(LenAlloca)); IRBlocks generated from the above crashes. I see the LLVM bloc...