From f5588dc4ec43da1e4423e5ff2394669c0f000350 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 27 Nov 2007 13:23:08 +0000 Subject: Fix PR1146: parameter attributes are longer part of the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'docs/LangRef.html') diff --git a/docs/LangRef.html b/docs/LangRef.html index 0c2f8ca..f85a441 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -764,9 +764,9 @@ a power of 2.

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:

-- cgit v1.1