For a call to LLVMBuildCall2 you can find the LLVMValueRef using LLVMGetNamedFunction but I don’t see anyway to get the function type (LLVMTypeRef) for said function. Basically I would exact another function to act on the output of LLVMGetNamedFunction.
Here’s an example of the call I’m trying to make.
LLVMBuildCall2(builder, /* THIS TYPE */, LLVMGetNamedFunction(module, "print"), &arg, 1, "");
Is this not provided in the API and should I keep track of it myself?