Skip to content

Commit 266f2c8

Browse files
authored
Merge pull request swiftlang#16589 from kitasuke/update_documentation_of_alloc_stack_for_sil
[Gardening] Update alloc_stack documentation in SIL.rst
2 parents 9ff7485 + c4b4ecb commit 266f2c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/SIL.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,9 +1910,7 @@ Allocates uninitialized memory that is sufficiently aligned on the stack
19101910
to contain a value of type ``T``. The result of the instruction is the address
19111911
of the allocated memory.
19121912

1913-
If a type is runtime-sized, the compiler must emit code to potentially
1914-
dynamically allocate memory. So there is no guarantee that the allocated
1915-
memory is really located on the stack.
1913+
``alloc_stack`` always allocates memory on the stack even for runtime-sized type.
19161914

19171915
``alloc_stack`` marks the start of the lifetime of the value; the
19181916
allocation must be balanced with a ``dealloc_stack`` instruction to

0 commit comments

Comments
 (0)