Skip to content

Commit 2a8f846

Browse files
committed
SIL.rst: make it clear that end_lifetime can also have an address operand.
1 parent 5f3c6da commit 2a8f846

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/SIL.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,10 +4550,19 @@ end_lifetime
45504550

45514551
sil-instruction ::= 'end_lifetime' sil-operand
45524552

4553+
// Consumes %0 without destroying it
4554+
end_lifetime %0 : $T
4555+
4556+
// Consumes the memory location %1 without destroying it
4557+
end_lifetime %1 : $*T
4558+
45534559
This instruction signifies the end of it's operand's lifetime to the ownership
45544560
verifier. It is inserted by the compiler in instances where it could be illegal
45554561
to insert a destroy operation. Ex: if the sil-operand had an undef value.
45564562

4563+
The instruction accepts an object or address type.
4564+
4565+
`@owned T`. If its argument is an address type, it's an identity projection.
45574566
This instruction is valid only in OSSA and is lowered to a no-op when lowering
45584567
to non-OSSA.
45594568

0 commit comments

Comments
 (0)