[llvm] fdf2b0a - [LangRef] Document that sret only works with void returns (#112167)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 02:50:55 PDT 2024
Author: Jubilee
Date: 2024-10-14T11:50:52+02:00
New Revision: fdf2b0a252c8aac9805b110a249817502d10e39f
URL: https://github.com/llvm/llvm-project/commit/fdf2b0a252c8aac9805b110a249817502d10e39f
DIFF: https://github.com/llvm/llvm-project/commit/fdf2b0a252c8aac9805b110a249817502d10e39f.diff
LOG: [LangRef] Document that sret only works with void returns (#112167)
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index b956e7ca209aec..b08bd79147f7de 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1309,12 +1309,14 @@ Currently, only the following parameter attributes are defined:
structure that is the return value of the function in the source
program. This pointer must be guaranteed by the caller to be valid:
loads and stores to the structure may be assumed by the callee not
- to trap and to be properly aligned. This is not a valid attribute
- for return values.
+ to trap and to be properly aligned.
The sret type argument specifies the in memory type, which must be
the same as the pointee type of the argument.
+ A function that accepts an ``sret`` argument must return ``void``.
+ A return value may not be ``sret``.
+
.. _attr_elementtype:
``elementtype(<ty>)``
More information about the llvm-commits
mailing list