Displaying 1 result from an estimated 1 matches for "fooargs".
2015 Mar 24
2
[LLVMdev] IR blocks for calling function pointers
...trying to create IR block for making a call to function pointer.
For creating the IR for a function call to "foo", with "foo" being defined
as "void foo(int)", I can use the "getOrInsertFunction" call from Module
class as follows:
std::vector<Type*> FooArgs;
FooArgs.push_back(IRB.getInt64Ty());
Value *FooFunction = M.getOrInsertFunction(std::string("foo"),
FunctionType::get(IRB.getVoidTy(),
ArrayRef<Type*>(FooArgs), false));
IRB.CreateCall(FooFunction, IRB.CreateLoad(LenAlloca));
I want t...