Skip to content

Commit 12a122a

Browse files
committed
Tests: Fix unavailable_decl_optimization_stub tests on Windows.
1 parent 5f4fe49 commit 12a122a

7 files changed

+27
-27
lines changed

test/SILGen/unavailable_decl_optimization_stub.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public struct S {}
44

5-
// CHECK-LABEL: sil {{.*}} @$s4Test15unavailableFuncAA1SVyF
5+
// CHECK-LABEL: sil{{.*}}@$s4Test15unavailableFuncAA1SVyF
66
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
77
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
88
// CHECK: function_ref @$s4Test1SVACycfC
@@ -14,7 +14,7 @@ public func unavailableFunc() -> S {
1414

1515
enum SomeError: Error { case generic }
1616

17-
// CHECK-LABEL: sil {{.*}} @$s4Test23unavailableThrowingFuncyyKF
17+
// CHECK-LABEL: sil{{.*}}@$s4Test23unavailableThrowingFuncyyKF
1818
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
1919
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2020
// CHECK: throw
@@ -25,14 +25,14 @@ public func unavailableThrowingFunc() throws {
2525
}
2626

2727
// one-time initialization function for globalVar
28-
// CHECK-LABEL: sil {{.*}} @$s4Test9globalVar_WZ
28+
// CHECK-LABEL: sil{{.*}}@$s4Test9globalVar_WZ
2929
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3030
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3131
// CHECK: alloc_global
3232
// CHECK: } // end sil function '$s4Test9globalVar_WZ'
3333
//
3434
// globalVar.unsafeMutableAddressor
35-
// CHECK-LABEL: sil {{.*}} @$s4Test9globalVarAA1SVvau
35+
// CHECK-LABEL: sil{{.*}}@$s4Test9globalVarAA1SVvau
3636
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3737
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3838
// CHECK: global_addr @$s4Test9globalVar_Wz

test/SILGen/unavailable_decl_optimization_stub_class.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@ func foo() {}
66
@available(*, unavailable)
77
public class ExplicitInitClass {
88
// ExplicitInitClass.s.getter
9-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassC1sAA1SVvg
9+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassC1sAA1SVvg
1010
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
1111
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
1212
// CHECK: load
1313
// CHECK: } // end sil function '$s4Test17ExplicitInitClassC1sAA1SVvg'
1414
//
1515
// ExplicitInitClass.s.setter
16-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassC1sAA1SVvs
16+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassC1sAA1SVvs
1717
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
1818
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
1919
// CHECK: assign
2020
// CHECK: } // end sil function '$s4Test17ExplicitInitClassC1sAA1SVvs'
2121
//
2222
// ExplicitInitClass.s.modify
23-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassC1sAA1SVvM
23+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassC1sAA1SVvM
2424
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
2525
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2626
// CHECK: yield
2727
// CHECK: } // end sil function '$s4Test17ExplicitInitClassC1sAA1SVvM'
2828
public var s: S
2929

3030
// ExplicitInitClass.__allocating_init()
31-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassCACycfC
31+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassCACycfC
3232
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3333
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3434
// CHECK: alloc_ref $ExplicitInitClass
3535
// CHECK: function_ref @$s4Test17ExplicitInitClassCACycfc
3636
// CHECK: } // end sil function '$s4Test17ExplicitInitClassCACycfC'
3737
//
3838
// ExplicitInitClass.init()
39-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassCACycfc
39+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassCACycfc
4040
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
4141
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
4242
// CHECK: function_ref @$s4Test1SVACycfC
@@ -46,14 +46,14 @@ public class ExplicitInitClass {
4646
}
4747

4848
// ExplicitInitClass.deinit
49-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassCfd
49+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassCfd
5050
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
5151
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
5252
// CHECK: {{%.*}} = function_ref @$s4Test3fooyyF
5353
// CHECK: } // end sil function '$s4Test17ExplicitInitClassCfd'
5454
//
5555
// ExplicitInitClass.__deallocating_deinit
56-
// CHECK-LABEL: sil {{.*}} @$s4Test17ExplicitInitClassCfD
56+
// CHECK-LABEL: sil{{.*}}@$s4Test17ExplicitInitClassCfD
5757
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
5858
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
5959
// CHECK: {{%.*}} = function_ref @$s4Test17ExplicitInitClassCfd

test/SILGen/unavailable_decl_optimization_stub_objc.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ func foo() {}
99
@available(*, unavailable)
1010
@objc public class C: NSObject {
1111
// C.__allocating_init()
12-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCACycfC
12+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCACycfC
1313
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
1414
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
1515
// CHECK: {{%.*}} = function_ref @$s4Test1CCACycfcTD
1616
// CHECK: } // end sil function '$s4Test1CCACycfC'
1717
//
1818
// dynamic C.init()
19-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCACycfcTD
19+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCACycfcTD
2020
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
2121
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2222
// CHECK: objc_method %0 : $C, #C.init!initializer.foreign
2323
// CHECK: } // end sil function '$s4Test1CCACycfcTD'
2424
//
2525
// C.init()
26-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCACycfc
26+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCACycfc
2727
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
2828
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2929
// CHECK: {{%.*}} = function_ref @$s4Test3fooyyF
3030
// CHECK: } // end sil function '$s4Test1CCACycfc'
3131
//
3232
// @objc C.init()
33-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCACycfcTo
33+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCACycfcTo
3434
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3535
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3636
// CHECK: {{%.*}} = function_ref @$s4Test1CCACycfc
@@ -40,14 +40,14 @@ func foo() {}
4040
}
4141

4242
// C.__deallocating_deinit
43-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCfD
43+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCfD
4444
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
4545
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
4646
// CHECK: {{%.*}} = function_ref @$s4Test3fooyyF
4747
// CHECK: } // end sil function '$s4Test1CCfD'
4848
//
4949
// @objc C.__deallocating_deinit
50-
// CHECK-LABEL: sil {{.*}} @$s4Test1CCfDTo
50+
// CHECK-LABEL: sil{{.*}}@$s4Test1CCfDTo
5151
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
5252
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
5353
// CHECK: {{%.*}} = function_ref @$s4Test1CCfD

test/SILGen/unavailable_decl_optimization_stub_opaque_type.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public protocol P {}
44
public struct S {}
55
extension S: P {}
66

7-
// CHECK-LABEL: sil {{.*}} @$s4Test27unavailableOpaqueReturnFuncQryF
7+
// CHECK-LABEL: sil{{.*}}@$s4Test27unavailableOpaqueReturnFuncQryF
88
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
99
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
1010
// CHECK: function_ref @$s4Test1SVACycfC

test/SILGen/unavailable_decl_optimization_stub_protocol_witness.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ extension EnumWithProtocolWitness: P {}
1616

1717
// protocol witness for static P.requirement(_:) in conformance EnumWithProtocolWitness
1818
//
19-
// CHECK-LABEL: sil {{.*}} @$s4Test23EnumWithProtocolWitnessOAA1PA2aDP11requirementyxAA1SVFZTW
19+
// CHECK-LABEL: sil{{.*}}@$s4Test23EnumWithProtocolWitnessOAA1PA2aDP11requirementyxAA1SVFZTW
2020
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
2121
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2222
// CHECK: {{%.*}} = function_ref @$s4Test23EnumWithProtocolWitnessO11requirementyAcA1SVcACmF
2323
// CHECK: } // end sil function '$s4Test23EnumWithProtocolWitnessOAA1PA2aDP11requirementyxAA1SVFZTW'
2424
//
2525
// EnumWithProtocolWitness.requirement(_:)
2626
//
27-
// CHECK-LABEL: sil {{.*}} @$s4Test23EnumWithProtocolWitnessO11requirementyAcA1SVcACmF
27+
// CHECK-LABEL: sil{{.*}}@$s4Test23EnumWithProtocolWitnessO11requirementyAcA1SVcACmF
2828
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
2929
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3030
// CHECK: enum $EnumWithProtocolWitness, #EnumWithProtocolWitness.requirement!enumelt

test/SILGen/unavailable_decl_optimization_stub_struct.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ public func testImplicitConstructor() {
2020
@available(*, unavailable)
2121
public struct ExplicitInitStruct {
2222
// ExplicitInitStruct.s.getter
23-
// CHECK-LABEL: sil {{.*}} @$s4Test18ExplicitInitStructV1sAA1SVvg
23+
// CHECK-LABEL: sil{{.*}}@$s4Test18ExplicitInitStructV1sAA1SVvg
2424
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
2525
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
2626
// CHECK: struct_extract
2727
// CHECK: } // end sil function '$s4Test18ExplicitInitStructV1sAA1SVvg'
2828
//
2929
// ExplicitInitStruct.s.setter
30-
// CHECK-LABEL: sil {{.*}} @$s4Test18ExplicitInitStructV1sAA1SVvs
30+
// CHECK-LABEL: sil{{.*}}@$s4Test18ExplicitInitStructV1sAA1SVvs
3131
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3232
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
3333
// CHECK: assign
3434
// CHECK: } // end sil function '$s4Test18ExplicitInitStructV1sAA1SVvs'
3535
//
3636
// ExplicitInitStruct.s.modify
37-
// CHECK-LABEL: sil {{.*}} @$s4Test18ExplicitInitStructV1sAA1SVvM
37+
// CHECK-LABEL: sil{{.*}}@$s4Test18ExplicitInitStructV1sAA1SVvM
3838
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
3939
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
4040
// CHECK: yield
4141
// CHECK: } // end sil function '$s4Test18ExplicitInitStructV1sAA1SVvM'
4242
public var s: S
4343

44-
// CHECK-LABEL: sil {{.*}} @$s4Test18ExplicitInitStructVACycfC
44+
// CHECK-LABEL: sil{{.*}}@$s4Test18ExplicitInitStructVACycfC
4545
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
4646
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
4747
// CHECK: function_ref @$s4Test1SVACycfC
@@ -56,7 +56,7 @@ func foo() {}
5656
@available(*, unavailable)
5757
@_moveOnly
5858
struct MoveOnlyStruct {
59-
// CHECK-LABEL: sil {{.*}} @$s4Test14MoveOnlyStructVfD
59+
// CHECK-LABEL: sil{{.*}}@$s4Test14MoveOnlyStructVfD
6060
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN]] : $@convention(thin) () -> Never
6161
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
6262
// CHECK: {{%.*}} = function_ref @$s4Test3fooyyF

test/SILOptimizer/unavailable_decl_optimization_stub.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
public struct S {}
44

5-
// CHECK-LABEL: sil {{.*}} @$s4Test15unavailableFuncAA1SVyF
5+
// CHECK-LABEL: sil{{.*}}@$s4Test15unavailableFuncAA1SVyF
66
// CHECK: [[FNREF:%.*]] = function_ref @$[[DIAGNOSEFN:ss31_diagnoseUnavailableCodeReacheds5NeverOy(FTwb|F)]] : $@convention(thin) () -> Never
77
// CHECK-NEXT: [[APPLY:%.*]] = apply [[FNREF]]()
88
// CHECK-NEXT: unreachable
9-
// CHECK-NEXT: end sil function '$s4Test15unavailableFuncAA1SVyF'
9+
// CHECK-NEXT: } // end sil function '$s4Test15unavailableFuncAA1SVyF'
1010
@available(*, unavailable)
1111
public func unavailableFunc() -> S {
1212

0 commit comments

Comments
 (0)