clarify that byval is valid for any pointer argument.
authorChris Lattner <sabre@nondot.org>
Tue, 15 Jan 2008 04:34:22 +0000 (04:34 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 15 Jan 2008 04:34:22 +0000 (04:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45998 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LangRef.html

index fa5019370a4680f322c9e754e18f7e304cc2dd61..49bcc974f08342125acca8b5b6c5b7f07d5c2f5b 100644 (file)
@@ -810,11 +810,12 @@ declare i32 @atoi(i8*) nounwind readonly
     target-specific</dd>
 
     <dt><tt>byval</tt></dt>
-    <dd>This indicates that the pointer parameter is really an aggregate that
-    was passed by value to the function.  The attribute implies that a hidden
-    copy of the struct is made between the caller and the callee, so the
-    callee is unable to modify the struct in the callee.  This attribute is only
-    valid on llvm pointer arguments.</dd>
+    <dd>This indicates that the pointer parameter should really be passed by
+    value to the function.  The attribute implies that a hidden copy of the
+    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).</dd>
 
     <dt><tt>sret</tt></dt>
     <dd>This indicates that the parameter specifies the address of a structure