[LLVMdev] the optional function return attribute and the llvm-c bindings

Duncan Sands baldrick at free.fr
Tue Dec 21 00:43:04 PST 2010


Hi James,

> Is it my imagination, or is there no way in LLVM 2.8 (or current trunk) to use the facilities defined in<llvm-c/Core.h>  to get or set the optional return parameter attribute on a function value?
>
> All the functions in the "Operations on parameters" parameters section actually seem to work only on the function arguments and not the return parameter.  Is this intentional?  What should I do if I need to get or set the return parameter attributes of a function from OCaml?

IIRC the function return value is considered to be the parameter with index 0.
The function itself is considered to be the parameter with index ~0U.

Ciao, Duncan.



More information about the llvm-dev mailing list