Function::getArgumentList() question

Hi folks –

The comments in Function.h for Function::getArgumentList() state that the argument list is empty for external functions. This entails (I think) that it is not possible to determine the contents of the argument list of functions for which LLVM has only seen a forward declaration, for a given compilation unit. Is this correct?

If this is the case, is there any way around this? I’m in a situation where it’d be I have only declarations of a bunch of (library) functions, and need to determine the size (in bytes) of their operands for a particular target. If my understanding of the aforementioned comment is correct, then it seems that the entire library would need to be witnessed by LLVM in order for me to obtain this information.

TIA for any advice,

-j

The comments in Function.h for Function::getArgumentList() state that
the argument list is empty for external functions. This entails (I

That comment is actually out of date, and has been updated. Sorry. Only
the basic block list is empty for external functions.

think) that it is not possible to determine the contents of the argument
list of functions for which LLVM has only seen a forward declaration,
for a given compilation unit. Is this correct?

Even without the argument list, you can always get the type of the
function (using getType() or getFunctionType()) and look at the argument
types from the FunctionType...

-Chris