From f3e0431b763979c373258f7222668e87bb5d28cb Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 16 Dec 2020 10:25:07 -0500 Subject: [PATCH] LangRef: Update byval/sret description for required types --- llvm/docs/LangRef.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b29eb58..cde9ed5 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 different kinds of registers). Use of this attribute is target-specific. -``byval`` or ``byval()`` +``byval()`` 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()`` +``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. 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: -- 2.7.4