1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

LangRef: Update byval/sret description for required types

This commit is contained in:
Matt Arsenault 2020-12-16 10:25:07 -05:00
parent 0f58806903
commit a6f5a606fa

View File

@ -1045,7 +1045,7 @@ Currently, only the following parameter attributes are defined:
opposed to memory, though some targets use it to distinguish between
two different 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: