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
199199 NO_UPDATE_NEEDED (Object)
200200 NO_UPDATE_NEEDED (OpenExistentialRef)
201201 NO_UPDATE_NEEDED (OpenExistentialAddr)
202+ NO_UPDATE_NEEDED (OpenExistentialBox)
202203 NO_UPDATE_NEEDED (ConvertFunction)
203204 NO_UPDATE_NEEDED (RefToBridgeObject)
204205 NO_UPDATE_NEEDED (BridgeObjectToRef)
Original file line number Diff line number Diff line change 44sil_stage raw
55
66import Builtin
7+ import Swift
78
89//////////////////
910// Declarations //
@@ -38,8 +39,6 @@ struct KlassPair {
3839
3940sil @use_klass : $@convention(thin) (@guaranteed Klass) -> ()
4041
41- protocol Error {}
42-
4342///////////
4443// Tests //
4544///////////
@@ -616,6 +615,17 @@ bb0(%x : @guaranteed $any Error):
616615 return %em : $@thick any Error.Type
617616}
618617
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+
619629// CHECK-LABEL: sil [ossa] @builtin_tsanInoutAccess : {{.*}} {
620630// CHECK: builtin "tsanInoutAccess"
621631// CHECK-LABEL: } // end sil function 'builtin_tsanInoutAccess'
You can’t perform that action at this time.
0 commit comments