From 1361c0c6efc08e4808b67cab6e22d0a7a5f81fc7 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 8 Sep 2016 15:45:27 +0000 Subject: [PATCH] Remove restriction that 'sret' must be on the first parameter On Windows, it is often applied to the second parameter, and the x86 backend is prepared to deal with sret appearing on any parameter. Other backends assume it only appears on parameter zero, but those are target-specific requirements, and not an IR-level rule. llvm-svn: 280951 --- llvm/docs/LangRef.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 4bbd063..b2ac11b 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1029,10 +1029,9 @@ Currently, only the following parameter attributes are defined: 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: - loads and stores to the structure may be assumed by the callee - not to trap and to be properly aligned. This may only be applied to - the first parameter. This is not a valid attribute for return - values. + 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. ``align `` This indicates that the pointer value may be assumed by the optimizer to -- 2.7.4