diff options
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r-- | llvm/docs/LangRef.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index b2ac11b5ee1..917a54622a8 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1126,10 +1126,11 @@ Currently, only the following parameter attributes are defined: This attribute is motivated to model and optimize Swift error handling. It can be applied to a parameter with pointer to pointer type or a pointer-sized alloca. At the call site, the actual argument that corresponds - to a ``swifterror`` parameter has to come from a ``swifterror`` alloca. A - ``swifterror`` value (either the parameter or the alloca) can only be loaded - and stored from, or used as a ``swifterror`` argument. This is not a valid - attribute for return values and can only be applied to one parameter. + to a ``swifterror`` parameter has to come from a ``swifterror`` alloca or + the ``swifterror`` parameter of the caller. A ``swifterror`` value (either + the parameter or the alloca) can only be loaded and stored from, or used as + a ``swifterror`` argument. This is not a valid attribute for return values + and can only be applied to one parameter. These constraints allow the calling convention to optimize access to ``swifterror`` variables by associating them with a specific register at |