Skip to content

Commit 970c45e

Browse files
committed
NCGenerics: adjust for mangling & type lowering
We're no longer mangling the Copyable or Escapable protocol into generic signatures, but haven't yet started mangling inverses into it, thus one function got renamed Otherwise, the type lowering has become more pessimistic about whether the type is actually Copyable, thus a few functions have changed their convention to be passed indirectly (`@guaranteed`).
1 parent cf42840 commit 970c45e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/SILGen/typelowering_inverses.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ func check(_ t: RudeEnum<Int>) {}
3434
// CHECK: sil hidden [ossa] @$s4main5checkyyAA8RudeEnumOyAA2NCVGF : $@convention(thin) (RudeEnum<NC>) -> () {
3535
func check(_ t: RudeEnum<NC>) {}
3636

37-
// CHECK: sil hidden [ossa] @$s4main5checkyyAA18CondCopyableStructVySiGF : $@convention(thin) (CondCopyableStruct<Int>) -> () {
37+
// CHECK: sil hidden [ossa] @$s4main5checkyyAA18CondCopyableStructVySiGF : $@convention(thin) (@guaranteed CondCopyableStruct<Int>) -> () {
3838
func check(_ t: CondCopyableStruct<Int>) {}
3939

4040
// CHECK: sil hidden [ossa] @$s4main5checkyyAA18CondCopyableStructVyAA2NCVGF : $@convention(thin) (@guaranteed CondCopyableStruct<NC>) -> () {
4141
func check(_ t: borrowing CondCopyableStruct<NC>) {}
4242

43-
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOySiGF : $@convention(thin) (CondCopyableEnum<Int>) -> () {
43+
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOySiGF : $@convention(thin) (@guaranteed CondCopyableEnum<Int>) -> () {
4444
func check(_ t: CondCopyableEnum<Int>) {}
4545

4646
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOyAA2NCVGF : $@convention(thin) (@guaranteed CondCopyableEnum<NC>) -> () {
4747
func check(_ t: borrowing CondCopyableEnum<NC>) {}
4848

49-
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOyxGs0D0Rzs9EscapableRzlF : $@convention(thin) <T where T : Copyable, T : Escapable> (@in_guaranteed CondCopyableEnum<T>) -> () {
49+
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOyxGlF : $@convention(thin) <T where T : Copyable, T : Escapable> (@in_guaranteed CondCopyableEnum<T>) -> () {
5050
func check<T>(_ t: CondCopyableEnum<T>) {}
5151

52-
// CHECK: sil hidden [ossa] @$s4main5checkyyAA16CondCopyableEnumOyxGs9EscapableRzlF : $@convention(thin) <U where U : Escapable> (@in_guaranteed CondCopyableEnum<U>) -> () {
53-
func check<U: ~Copyable>(_ t: borrowing CondCopyableEnum<U>) {}
52+
// CHECK: sil hidden [ossa] @$s4main13check_noClashyyAA16CondCopyableEnumOyxGlF : $@convention(thin) <U where U : Escapable> (@in_guaranteed CondCopyableEnum<U>) -> () {
53+
func check_noClash<U: ~Copyable>(_ t: borrowing CondCopyableEnum<U>) {}

0 commit comments

Comments
 (0)