[LLVMdev] creating and inserting a function with variable arguments

Óscar Fuentes ofv at wanadoo.es
Mon Apr 15 18:52:39 PDT 2013


Akshay Jain <jivan.molu at gmail.com> writes:

> I am working on a pass in which I need to define and insert a function with
> variable arguments. Can I do it with the help of getOrInsertFunction()?

Sure. There is an overload of getOrInsertFunction that takes a
FunctionType, and there are FunctionType::get static methods where you
say if the function type takes a variable number of arguments. See the
doxygen documentation for FunctionType and Module::getOrInsertFunction.




More information about the llvm-dev mailing list