@@ -5285,7 +5285,8 @@ positive. Otherwise, traps.
5285
5285
5286
5286
This operation must be atomic with respect to the final ``strong_release `` on
5287
5287
the operand (source) heap object. It need not be atomic with respect to
5288
- ``store_unowned `` or ``load_unowned `` operations on the same address.
5288
+ ``store_unowned ``/``unowned_copy_value `` or
5289
+ ``load_unowned ``/``strong_copy_unowned_value `` operations on the same address.
5289
5290
5290
5291
store_unowned
5291
5292
`````````````
@@ -5305,8 +5306,30 @@ The storage must be initialized iff ``[init]`` is not specified.
5305
5306
5306
5307
This operation must be atomic with respect to the final ``strong_release `` on
5307
5308
the operand (source) heap object. It need not be atomic with respect to
5308
- ``store_unowned `` or ``load_unowned `` operations on the same address.
5309
+ ``store_unowned ``/``unowned_copy_value `` or
5310
+ ``load_unowned ``/``strong_copy_unowned_value `` operations on the same address.
5309
5311
5312
+ unowned_copy_value
5313
+ ``````````````````
5314
+ ::
5315
+
5316
+ sil-instruction ::= 'unowned_copy_value' sil-operand
5317
+
5318
+ %1 = unowned_copy_value %0 : $T
5319
+ // %1 will be an @owned value of type $@sil_unowned T.
5320
+ // $T must be a reference type
5321
+ // $@sil_unowned T must be address-only
5322
+
5323
+ Only valid in opaque values mode. Lowered by AddressLowering to store_unowned.
5324
+
5325
+ Increments the unowned reference count of the object at ``%0 ``.
5326
+
5327
+ Wraps the operand in an instance of ``@sil_unowned ``.
5328
+
5329
+ This operation must be atomic with respect to the final ``strong_release `` on
5330
+ the operand (source) heap object. It need not be atomic with respect to
5331
+ ``store_unowned ``/``unowned_copy_value `` or
5332
+ ``load_unowned ``/``strong_copy_unowned_value `` operations on the same address.
5310
5333
5311
5334
fix_lifetime
5312
5335
````````````
0 commit comments