From 66d922c909b1e1e2e43ca7903acf3cc5aa345fb4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 4 Oct 2008 18:33:34 +0000 Subject: [PATCH] improve description of param/ret attrs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57061 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 55411640c99..e0945b1c5a4 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -826,7 +826,8 @@ a power of 2.

 declare i32 @printf(i8* noalias , ...)
-declare i32 @atoi(i8 zeroext*)
+declare i32 @atoi(i8 zeroext)
+declare signext i8 @returns_signed_char()
 
@@ -836,19 +837,21 @@ declare i32 @atoi(i8 zeroext*)

Currently, only the following parameter attributes are defined:

zeroext
-
This indicates that the parameter should be zero extended just before - a call to this function.
+
This indicates to the code generator that the parameter or return value + should be zero-extended to a 32-bit value by the caller (for a parameter) + or the callee (for a return value).
signext
-
This indicates that the parameter should be sign extended just before - a call to this function.
+
This indicates to the code generator that the parameter or return value + should be sign-extended to a 32-bit value by the caller (for a parameter) + or the callee (for a return value).
inreg
This indicates that this parameter or return value should be treated in a special target-dependent fashion during while emitting code for a function call or return (usually, by putting it in a register as opposed - to memory; in some places it is used to distinguish between two different - kinds of registers). Use of this attribute is target-specific
+ to memory, though some targets use it to distinguish between two different + kinds of registers). Use of this attribute is target-specific.
byval
This indicates that the pointer parameter should really be passed by @@ -856,13 +859,14 @@ declare i32 @atoi(i8 zeroext*) pointee is made between the caller and the callee, so the callee is unable to modify the value in the callee. This attribute is only valid on LLVM pointer arguments. It is generally used to pass structs and arrays by - value, but is also valid on scalars (even though this is silly).
+ value, but is also valid on pointers to scalars.
sret
This indicates that the pointer parameter specifies the address of a structure that is the return value of the function in the source program. - Loads and stores to the structure are assumed not to trap. - May only be applied to the first parameter.
+ This pointer must be guaranteed by the caller to be valid: loads and stores + to the structure may be assumed by the callee to not to trap. This may only + be applied to the first parameter.
noalias
This indicates that the parameter does not alias any global or any other