Displaying 1 result from an estimated 1 matches for "irblock".
Did you mean:
inblock
2015 Mar 24
2
[LLVMdev] IR blocks for calling function pointers
...nAlloca));
I want to create a similar call, but to the pointer of foo ("foo_ptr" is
defined as "(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.Cre...