From f5588dc4ec43da1e4423e5ff2394669c0f000350 Mon Sep 17 00:00:00 2001
From: Duncan Sands
The return type and each parameter of a function type may have a set of parameter attributes associated with them. Parameter attributes are used to communicate additional information about the result or parameters of - a function. Parameter attributes are considered to be part of the function - type so two functions types that differ only by the parameter attributes - are different function types.
+ a function. Parameter attributes are considered to be part of the function, + not of the function type, so functions with different parameter attributes + can have the same function type.Parameter attributes are simple keywords that follow the type specified. If multiple parameter attributes are needed, they are space separated. For @@ -774,15 +774,13 @@ a power of 2.
-%someFunc = i16 (i8 signext %someParam) zeroext -%someFunc = i16 (i8 zeroext %someParam) zeroext +declare i32 @printf(i8* noalias , ...) nounwind +declare i32 @atoi(i8*) nounwind readonly
Note that the two function types above are unique because the parameter has - a different attribute (signext in the first one, zeroext in - the second). Also note that the attribute for the function result - (zeroext) comes immediately after the argument list.
+Note that any attributes for the function result (nounwind, + readonly) come immediately after the argument list.
Currently, only the following parameter attributes are defined: