Skip to content

Commit 6900103

Browse files
authored
Merge pull request swiftlang#30236 from eeckstein/sil-docs
2 parents 0544a88 + a637b89 commit 6900103

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/SIL.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,7 @@ alloc_stack
19611961
```````````
19621962
::
19631963

1964-
sil-instruction ::= 'alloc_stack' sil-type (',' debug-var-attr)*
1964+
sil-instruction ::= 'alloc_stack' '[dynamic_lifetime]'? sil-type (',' debug-var-attr)*
19651965

19661966
%1 = alloc_stack $T
19671967
// %1 has type $*T
@@ -1980,6 +1980,10 @@ predecessors, the stack height and order of allocations must be consistent
19801980
coming from all predecessor blocks. ``alloc_stack`` allocations must be
19811981
deallocated in last-in, first-out stack order.
19821982

1983+
The ``dynamic_lifetime`` attribute specifies that the initialization and
1984+
destruction of the stored value cannot be verified at compile time.
1985+
This is the case, e.g. for conditionally initialized objects.
1986+
19831987
The memory is not retainable. To allocate a retainable box for a value
19841988
type, use ``alloc_box``.
19851989

0 commit comments

Comments
 (0)