[LLVMdev] paramter attributes and function types

Duncan Sands baldrick at free.fr
Mon Mar 1 04:43:17 PST 2010


Hi James,

> I can see how to apply attributes to function parameters and return values when defining and declaring functions, but I don't see how to do it for function type definitions.

you can't.  It used to be the case long ago that attributes went on types, but
now they go only on calls and function declarations.

> Nevertheless, the LLVM Language Reference document suggests, in the examples for the Function Types section, that parameter attributes are part of function types.

Where exactly?  I don't see it in the online version.

> q1. Am I missing something?  Is there a way to apply attributes to parameters in function types?

No, there is no way.

> q2. If not in LLVM 2.6, is this something already sorted out in the forthcoming LLVM 2.7 release?
> q3. If not, is it something that *could* be sorted out in the forthcoming LLVM 2.7 release?

Not sure what you are asking here.  If you are asking if parameter attributes
could be added back to function types, then the answer is no, they will not be
added back to function types.  Maybe you should explain why you want that?

Ciao,

Duncan.



More information about the llvm-dev mailing list