[LLVMdev] Inserting a varargs function declaration with getOrInsertFunction()?

Duncan Sands baldrick at free.fr
Sun Apr 25 07:41:06 CDT 2010


Hi Patrick,

> I need to insert a varargs function declaration from within an LLVM
> pass.  getOrInsertFunction() allows an arbitrary list of type parameters
> for function arguments to be passed in, but as far as I can tell there
> is no LLVM "type" to represent the variable-length portion of a function
> argument list.  How is this normally done?

when you create a FunctionType you can specify whether it is varargs or not.

Ciao,

Duncan.


More information about the LLVMdev mailing list