Skip to content

Commit 56a24c7

Browse files
committed
[Variadic Generics] Update pack expansion type mangling in tests.
Previously, pack expansion types of plain parameter packs whose reduced shape is another parameter pack (i.e. as a result of parallel pack expansion somewhere else in the signature) was previously incorrect. Fixing that "broke" the incorrect mangling in these tests.
1 parent d42755c commit 56a24c7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/IRGen/variadic_generic_functions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ func f1<T...>(t: repeat each T) {}
1111
// CHECK-LABEL: define hidden swiftcc void @"$s26variadic_generic_functions2f21t1uyxxQp_q_q_Qptr0_lF"(i8** noalias nocapture dereferenceable(8) %0, i8** noalias nocapture dereferenceable(8) %1, i64 %2, i64 %3, %swift.type* %T, %swift.type* %U)
1212
func f2<T..., U...>(t: repeat each T, u: repeat each U) {}
1313

14-
// CHECK-LABEL: define hidden swiftcc void @"$s26variadic_generic_functions2f31t1uyxxQp_q_q_Qptq_Rhzr0_lF"(i8** noalias nocapture dereferenceable(8) %0, i8** noalias nocapture dereferenceable(8) %1, i64 %2, %swift.type* %T, %swift.type* %U)
14+
// CHECK-LABEL: define hidden swiftcc void @"$s26variadic_generic_functions2f31t1uyxxQp_q_xQptq_Rhzr0_lF"(i8** noalias nocapture dereferenceable(8) %0, i8** noalias nocapture dereferenceable(8) %1, i64 %2, %swift.type* %T, %swift.type* %U)
1515
func f3<T..., U...>(t: repeat each T, u: repeat each U) where (repeat (each T, each U)): Any {}

test/SILGen/pack_expansion_type.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
// XFAIL: OS=windows-msvc
77

8-
// CHECK-LABEL: sil [ossa] @$s19pack_expansion_type16variadicFunction1t1ux_q_txQp_txxQp_q_q_Qptq_Rhzr0_lF : $@convention(thin) <T..., U... where ((T, U)...) : Any> (@in_guaranteed T..., @in_guaranteed U...) -> @out (T, U)... {
8+
// CHECK-LABEL: sil [ossa] @$s19pack_expansion_type16variadicFunction1t1ux_q_txQp_txxQp_q_xQptq_Rhzr0_lF : $@convention(thin) <T..., U... where ((T, U)...) : Any> (@in_guaranteed T..., @in_guaranteed U...) -> @out (T, U)... {
99
// CHECK: bb0(%0 : $*(T, U)..., %1 : $*T..., %2 : $*U...):
1010
public func variadicFunction<T..., U...>(t: repeat each T, u: repeat each U) -> (repeat (each T, each U)) {}
1111

1212
public struct VariadicType<T...> {
13-
// CHECK-LABEL: sil [ossa] @$s19pack_expansion_type12VariadicTypeV14variadicMethod1t1ux_qd__txQp_txxQp_qd__qd__Qptqd__RhzlF : $@convention(method) <T...><U... where ((T, U)...) : Any> (@in_guaranteed T..., @in_guaranteed U..., VariadicType<T...>) -> @out (T, U)... {
13+
// CHECK-LABEL: sil [ossa] @$s19pack_expansion_type12VariadicTypeV14variadicMethod1t1ux_qd__txQp_txxQp_qd__xQptqd__RhzlF : $@convention(method) <T...><U... where ((T, U)...) : Any> (@in_guaranteed T..., @in_guaranteed U..., VariadicType<T...>) -> @out (T, U)... {
1414
// CHECK: bb0(%0 : $*(T, U)..., %1 : $*T..., %2 : $*U..., %3 : $VariadicType<T...>):
1515
public func variadicMethod<U...>(t: repeat each T, u: repeat each U) -> (repeat (each T, each U)) {}
1616

0 commit comments

Comments
 (0)