aboutsummaryrefslogtreecommitdiffstats
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-27 13:23:08 +0000
commitf5588dc4ec43da1e4423e5ff2394669c0f000350 (patch)
tree843dfcaeb8f6c99de930a32020148b563005c2fd /docs/LangRef.html
parent4b97e6dc76fe49155a0da53e3df3eef153729d0f (diff)
downloadexternal_llvm-f5588dc4ec43da1e4423e5ff2394669c0f000350.zip
external_llvm-f5588dc4ec43da1e4423e5ff2394669c0f000350.tar.gz
external_llvm-f5588dc4ec43da1e4423e5ff2394669c0f000350.tar.bz2
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
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html16
1 files changed, 7 insertions, 9 deletions
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.</p>
<p>The return type and each parameter of a function type may have a set of
<i>parameter attributes</i> 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.</p>
+ 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.</p>
<p>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.</p>
<div class="doc_code">
<pre>
-%someFunc = i16 (i8 signext %someParam) zeroext
-%someFunc = i16 (i8 zeroext %someParam) zeroext
+declare i32 @printf(i8* noalias , ...) nounwind
+declare i32 @atoi(i8*) nounwind readonly
</pre>
</div>
- <p>Note that the two function types above are unique because the parameter has
- a different attribute (<tt>signext</tt> in the first one, <tt>zeroext</tt> in
- the second). Also note that the attribute for the function result
- (<tt>zeroext</tt>) comes immediately after the argument list.</p>
+ <p>Note that any attributes for the function result (<tt>nounwind</tt>,
+ <tt>readonly</tt>) come immediately after the argument list.</p>
<p>Currently, only the following parameter attributes are defined:</p>
<dl>