File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ struct SILMoveOnlyWrappedTypeEliminatorVisitor
199
199
NO_UPDATE_NEEDED (Object)
200
200
NO_UPDATE_NEEDED (OpenExistentialRef)
201
201
NO_UPDATE_NEEDED (OpenExistentialAddr)
202
+ NO_UPDATE_NEEDED (OpenExistentialBox)
202
203
NO_UPDATE_NEEDED (ConvertFunction)
203
204
NO_UPDATE_NEEDED (RefToBridgeObject)
204
205
NO_UPDATE_NEEDED (BridgeObjectToRef)
Original file line number Diff line number Diff line change 4
4
sil_stage raw
5
5
6
6
import Builtin
7
+ import Swift
7
8
8
9
//////////////////
9
10
// Declarations //
@@ -38,8 +39,6 @@ struct KlassPair {
38
39
39
40
sil @use_klass : $@convention(thin) (@guaranteed Klass) -> ()
40
41
41
- protocol Error {}
42
-
43
42
///////////
44
43
// Tests //
45
44
///////////
@@ -616,6 +615,17 @@ bb0(%x : @guaranteed $any Error):
616
615
return %em : $@thick any Error.Type
617
616
}
618
617
618
+ // CHECK-LABEL: sil [ossa] @existential_box :
619
+ // CHECK: %1 = open_existential_box %0 : $any Error
620
+ // CHECK-LABEL: } // end sil function 'existential_box'
621
+ sil [ossa] @existential_box : $@convention(thin) (@guaranteed any Error) -> () {
622
+ bb0(%x : @guaranteed $any Error):
623
+ %y = copyable_to_moveonlywrapper [guaranteed] %x : $any Error
624
+ %o = open_existential_box %y : $@moveOnly (any Error) to $*@opened("01234567-89AB-CDEF-0123-000000000000", Error) Self
625
+ %r = tuple ()
626
+ return %r : $()
627
+ }
628
+
619
629
// CHECK-LABEL: sil [ossa] @builtin_tsanInoutAccess : {{.*}} {
620
630
// CHECK: builtin "tsanInoutAccess"
621
631
// CHECK-LABEL: } // end sil function 'builtin_tsanInoutAccess'
You can’t perform that action at this time.
0 commit comments