Skip to content

Commit 3e76ea2

Browse files
committed
[Test] Fix IRGen/typed_throws_abi.swift on Windows
1 parent 218742a commit 3e76ea2

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

test/IRGen/typed_throws_abi.swift

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Impl: P {
1515
// CHECK: ret void
1616
// CHECK: [[FAIL]]:
1717
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
18-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
18+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
1919
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
2020
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
2121
// CHECK: ret void
@@ -32,7 +32,7 @@ struct Impl: P {
3232
// CHECK: ret i64 1
3333
// CHECK: [[FAIL]]:
3434
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
35-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
35+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
3636
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
3737
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
3838
// CHECK: ret i64 undef
@@ -50,7 +50,7 @@ struct Impl: P {
5050
// CHECK: ret { i64, i64 } { i64 1, i64 2 }
5151
// CHECK: [[FAIL]]:
5252
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
53-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
53+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
5454
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
5555
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
5656
// CHECK: ret { i64, i64 } undef
@@ -68,7 +68,7 @@ struct Impl: P {
6868
// CHECK: ret { i64, i64, i64 } { i64 1, i64 2, i64 3 }
6969
// CHECK: [[FAIL]]:
7070
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
71-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
71+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
7272
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
7373
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
7474
// CHECK: ret { i64, i64, i64 } undef
@@ -86,7 +86,7 @@ struct Impl: P {
8686
// CHECK: ret { i64, i64, i64, i64 } { i64 1, i64 2, i64 3, i64 4 }
8787
// CHECK: [[FAIL]]:
8888
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
89-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
89+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
9090
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
9191
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %2, align 8
9292
// CHECK: ret { i64, i64, i64, i64 } undef
@@ -109,7 +109,7 @@ struct Impl: P {
109109
// CHECK: ret void
110110
// CHECK: [[FAIL]]:
111111
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
112-
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"() #12
112+
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
113113
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
114114
// CHECK: store ptr inttoptr (i64 1 to ptr), ptr %3, align 8
115115
// CHECK: ret void
@@ -215,7 +215,7 @@ struct Impl: P {
215215
return (1, 2, 3, 4)
216216
}
217217

218-
// CHECK: define hidden swiftcc void @"$s16typed_throws_abi4ImplV2g5ySi_S4itSbAA7OneWordVYKF"(ptr noalias nocapture sret(<{ %TSi, %TSi, %TSi, %TSi, %TSi }>) %0, i1 %1, ptr swiftself %2, ptr noalias nocapture swifterror dereferenceable(8) %3, ptr %4) #0 {
218+
// CHECK: define hidden swiftcc void @"$s16typed_throws_abi4ImplV2g5ySi_S4itSbAA7OneWordVYKF"(ptr noalias nocapture sret(<{ %TSi, %TSi, %TSi, %TSi, %TSi }>) %0, i1 %1, ptr swiftself %2, ptr noalias nocapture swifterror dereferenceable(8) %3, ptr %4)
219219
// CHECK: entry:
220220
// CHECK: [[ERROR:%.*]] = alloca %T16typed_throws_abi7OneWordV, align 8
221221
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
@@ -677,7 +677,7 @@ func callImpl_g5(_ impl: Impl, _ b: Bool) -> (Int, Int, Int, Int, Int) {
677677
@available(SwiftStdlib 6.0, *)
678678
struct ImplAsync: PAsync {
679679

680-
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2f0yySbYaAA5EmptyVYKF"(ptr swiftasync %0, i1 %1) #0 {
680+
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2f0yySbYaAA5EmptyVYKF"(ptr swiftasync %0, i1 %1)
681681
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
682682
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
683683
// CHECK: [[SUCCESS]]:
@@ -700,13 +700,13 @@ struct ImplAsync: PAsync {
700700
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
701701
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
702702
// CHECK: [[SUCCESS]]:
703-
// CHECK: %16 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, ptr null)
703+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, ptr null)
704704
// CHECK: unreachable
705705
// CHECK: [[FAIL]]:
706706
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
707707
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
708708
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
709-
// CHECK: %23 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, ptr inttoptr (i64 1 to ptr))
709+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, ptr inttoptr (i64 1 to ptr))
710710
// CHECK: unreachable
711711
// CHECK: }
712712
func f1(_ b: Bool) async throws(Empty) -> Int {
@@ -720,13 +720,13 @@ struct ImplAsync: PAsync {
720720
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
721721
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
722722
// CHECK: [[SUCCESS]]:
723-
// CHECK: %16 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, ptr null)
723+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, ptr null)
724724
// CHECK: unreachable
725725
// CHECK: [[FAIL]]:
726726
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
727727
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
728728
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
729-
// CHECK: %23 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
729+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
730730
// CHECK: unreachable
731731
// CHECK: }
732732
func f2(_ b: Bool) async throws(Empty) -> (Int, Int) {
@@ -740,13 +740,13 @@ struct ImplAsync: PAsync {
740740
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
741741
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
742742
// CHECK: [[SUCCESS]]:
743-
// CHECK: %16 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, i64 3, ptr null)
743+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, i64 3, ptr null)
744744
// CHECK: unreachable
745745
// CHECK: [[FAIL]]:
746746
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
747747
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
748748
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
749-
// CHECK: %23 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
749+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
750750
// CHECK: unreachable
751751
// CHECK: }
752752
func f3(_ b: Bool) async throws(Empty) -> (Int, Int, Int) {
@@ -760,13 +760,13 @@ struct ImplAsync: PAsync {
760760
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
761761
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
762762
// CHECK: [[SUCCESS]]:
763-
// CHECK: %16 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, i64 3, i64 4, ptr null)
763+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 1, i64 2, i64 3, i64 4, ptr null)
764764
// CHECK: unreachable
765765
// CHECK: [[FAIL]]:
766766
// CHECK: call swiftcc void @"$s16typed_throws_abi5EmptyVACycfC"()
767767
// CHECK: [[ERROR_WITNESS:%.*]] = call ptr @"$s16typed_throws_abi5EmptyVACs5ErrorAAWl"()
768768
// CHECK: call swiftcc void @swift_willThrowTyped(ptr noalias undef, ptr getelementptr inbounds (<{ ptr, ptr, i64, ptr }>, ptr @"$s16typed_throws_abi5EmptyVMf", i32 0, i32 2), ptr [[ERROR_WITNESS]])
769-
// CHECK: %23 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
769+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr [[CORO]], i1 false, ptr @"{{.*}}", ptr {{%.*}}, ptr {{%.*}}, i64 undef, i64 undef, i64 undef, i64 undef, ptr inttoptr (i64 1 to ptr))
770770
// CHECK: unreachable
771771
// CHECK: }
772772
func f4(_ b: Bool) async throws(Empty) -> (Int, Int, Int, Int) {
@@ -776,7 +776,7 @@ struct ImplAsync: PAsync {
776776
return (1, 2, 3, 4)
777777
}
778778

779-
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2f5ySi_S4itSbYaAA5EmptyVYKF"(ptr noalias nocapture %0, ptr swiftasync %1, i1 %2, ptr %3) #0 {
779+
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2f5ySi_S4itSbYaAA5EmptyVYKF"(ptr noalias nocapture %0, ptr swiftasync %1, i1 %2, ptr %3)
780780
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
781781
// CHECK: br i1 %2, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
782782
// CHECK: [[SUCCESS]]:
@@ -905,7 +905,7 @@ struct ImplAsync: PAsync {
905905
return (1, 2, 3, 4)
906906
}
907907

908-
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2g5ySi_S4itSbYaAA7OneWordVYKF"(ptr noalias nocapture %0, ptr swiftasync %1, i1 %2, ptr %3) #0 {
908+
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi9ImplAsyncV2g5ySi_S4itSbYaAA7OneWordVYKF"(ptr noalias nocapture %0, ptr swiftasync %1, i1 %2, ptr %3)
909909
// CHECK: [[ERROR:%.*]] = alloca %T16typed_throws_abi7OneWordV, align 8
910910
// CHECK: [[CORO:%.*]] = call ptr @llvm.coro.begin(token {{%.*}}, ptr null)
911911
// CHECK: br i1 %2, label %[[SUCCESS:.*]], label %[[FAIL:.*]]
@@ -1592,7 +1592,7 @@ func nonMatching_f0_async(_ b: Bool) async throws(OneWord) -> (Float, Float) {
15921592
// CHECK: [[RETVAL0:%.*]] = phi i64 [ [[ERROR_RES0:%.*]], %[[SET_ERROR]] ], [ 1, %[[SUCCESS]] ]
15931593
// CHECK: [[RETVAL1:%.*]] = phi float [ 0.000000e+00, %[[SET_ERROR]] ], [ [[SUCCESS_RES0]], %[[SUCCESS]] ]
15941594
// CHECK: [[RETVAL2:%.*]] = phi float [ 0.000000e+00, %[[SET_ERROR]] ], [ [[SUCCESS_RES1]], %[[SUCCESS]] ]
1595-
// CHECK: %39 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi24callNonMatching_f0_asyncySi_S2ftSbYaF.0.50", ptr {{%.*}}, ptr {{%.*}}, i64 [[RETVAL0]], float [[RETVAL1]], float [[RETVAL2]])
1595+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi24callNonMatching_f0_asyncySi_S2ftSbYaF.0.50", ptr {{%.*}}, ptr {{%.*}}, i64 [[RETVAL0]], float [[RETVAL1]], float [[RETVAL2]])
15961596
// CHECK: unreachable
15971597
// CHECK: [[SET_ERROR]]:
15981598
// CHECK: [[ERROR_RES0]] = phi i64 [ [[CALL_RES2]], %typed.error.load ]
@@ -1612,7 +1612,7 @@ func callNonMatching_f0_async(_ b: Bool) async -> (Int, Float, Float) {
16121612
// CHECK: define hidden swifttailcc void @"$s16typed_throws_abi20nonMatching_f1_asyncySf_SbSftSbYaAA7OneWordVYKF"(ptr swiftasync %0, i1 %1)
16131613
// CHECK: br i1 %1, label %[[SUCCESS:.*]], label %[[ERROR:.*]]
16141614
// CHECK: [[SUCCESS]]:
1615-
// CHECK: %17 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi20nonMatching_f1_asyncySf_SbSftSbYaAA7OneWordVYKF.0.51", ptr {{%.*}}, ptr {{%.*}}, float 1.000000e+00, i64 1, float 2.000000e+00, ptr null)
1615+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi20nonMatching_f1_asyncySf_SbSftSbYaAA7OneWordVYKF.0.51", ptr {{%.*}}, ptr {{%.*}}, float 1.000000e+00, i64 1, float 2.000000e+00, ptr null)
16161616
// CHECK: unreachable
16171617
// CHECK: [[ERROR]]:
16181618
// CHECK: [[ERROR_X:%.*]] = load i64, ptr %.x1._value, align 8
@@ -1654,7 +1654,7 @@ func nonMatching_f1_async(_ b: Bool) async throws(OneWord) -> (Float, Bool, Floa
16541654
// CHECK: [[RETVAL1:%.*]] = phi float [ 0.000000e+00, %[[SET_ERROR]] ], [ [[SUCCESS_RES0]], %[[SUCCESS]] ]
16551655
// CHECK: [[RETVAL2:%.*]] = phi i1 [ false, %[[SET_ERROR]] ], [ [[SUCCESS_RES1]], %[[SUCCESS]] ]
16561656
// CHECK: [[RETVAL3:%.*]] = phi float [ 0.000000e+00, %[[SET_ERROR]] ], [ [[SUCCESS_RES2]], %[[SUCCESS]] ]
1657-
// CHECK: %43 = call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi24callNonMatching_f1_asyncySi_SfSbSftSbYaF.0.52", ptr {{%.*}}, ptr {{%.*}}, i64 [[RETVAL0]], float [[RETVAL1]], i1 [[RETVAL2]], float [[RETVAL3]])
1657+
// CHECK: call i1 (ptr, i1, ...) @llvm.coro.end.async(ptr {{%.*}}, i1 false, ptr @"$s16typed_throws_abi24callNonMatching_f1_asyncySi_SfSbSftSbYaF.0.52", ptr {{%.*}}, ptr {{%.*}}, i64 [[RETVAL0]], float [[RETVAL1]], i1 [[RETVAL2]], float [[RETVAL3]])
16581658
// CHECK: unreachable
16591659
// CHECK: [[SET_ERROR]]:
16601660
// CHECK: [[ERROR_RES0]] = phi i64 [ [[CALL_RES1]], %typed.error.load ]

0 commit comments

Comments
 (0)