[llvm-branch-commits] [llvm] f3e0431 - LangRef: Update byval/sret description for required types
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 16 07:30:36 PST 2020
Author: Matt Arsenault
Date: 2020-12-16T10:25:36-05:00
New Revision: f3e0431b763979c373258f7222668e87bb5d28cb
URL: https://github.com/llvm/llvm-project/commit/f3e0431b763979c373258f7222668e87bb5d28cb
DIFF: https://github.com/llvm/llvm-project/commit/f3e0431b763979c373258f7222668e87bb5d28cb.diff
LOG: LangRef: Update byval/sret description for required types
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index b29eb589e2d7..cde9ed519626 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1045,7 +1045,7 @@ Currently, only the following parameter attributes are defined:
opposed to memory, though some targets use it to distinguish between
two
diff erent kinds of registers). Use of this attribute is
target-specific.
-``byval`` or ``byval(<ty>)``
+``byval(<ty>)``
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
@@ -1057,7 +1057,7 @@ Currently, only the following parameter attributes are defined:
``byval`` parameters). This is not a valid attribute for return
values.
- The byval attribute also supports an optional type argument, which
+ The byval type argument indicates the in-memory value type, and
must be the same as the pointee type of the argument.
The byval attribute also supports specifying an alignment with the
@@ -1144,7 +1144,7 @@ Currently, only the following parameter attributes are defined:
See :doc:`InAlloca` for more information on how to use this
attribute.
-``sret`` or ``sret(<ty>)``
+``sret(<ty>)``
This indicates that the pointer parameter specifies the address of a
structure that is the return value of the function in the source
program. This pointer must be guaranteed by the caller to be valid:
@@ -1152,9 +1152,8 @@ Currently, only the following parameter attributes are defined:
to trap and to be properly aligned. This is not a valid attribute
for return values.
- The sret attribute also supports an optional type argument, which
- must be the same as the pointee type of the argument. In the
- future this will be required.
+ The sret type argument specifies the in memory type, which must be
+ the same as the pointee type of the argument.
.. _attr_align:
More information about the llvm-branch-commits
mailing list