mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Revert "[SR-15703] Fix missing hop in error path of foreign async throws call""
This reverts commit 05214f0d00.
This commit is contained in:
@@ -25,19 +25,28 @@ func testSlowServing(p: SlowServing) async throws {
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
let _: String = await p.requestString()
|
||||
|
||||
// CHECK: objc_method {{.*}} $@convention(objc_method) <τ_0_0 where τ_0_0 : SlowServing> (@convention(block) (Optional<NSString>, Optional<NSError>) -> (), τ_0_0) -> ()
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
let _: String = try await p.tryRequestString()
|
||||
|
||||
// CHECK: objc_method {{.*}} $@convention(objc_method) <τ_0_0 where τ_0_0 : SlowServing> (@convention(block) (Int, NSString) -> (), τ_0_0) -> ()
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
let _: (Int, String) = await p.requestIntAndString()
|
||||
|
||||
// CHECK: objc_method {{.*}} $@convention(objc_method) <τ_0_0 where τ_0_0 : SlowServing> (@convention(block) (Int, Optional<NSString>, Optional<NSError>) -> (), τ_0_0) -> ()
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
// CHECK: builtin "willThrow"
|
||||
// CHECK-NEXT: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
let _: (Int, String) = try await p.tryRequestIntAndString()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: sil {{.*}}@{{.*}}20testSlowServingAgain
|
||||
func testSlowServingAgain(p: SlowServing) async throws {
|
||||
// CHECK: [[GENERIC_EXECUTOR:%.*]] = enum $Optional<Builtin.Executor>, #Optional.none
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
// CHECK: objc_method {{.*}} $@convention(objc_method) <τ_0_0 where τ_0_0 : SlowServing> (@convention(block) (Optional<NSString>, Optional<NSError>) -> (), τ_0_0) -> ()
|
||||
// CHECK: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
// CHECK: builtin "willThrow"
|
||||
// CHECK-NEXT: hop_to_executor [[GENERIC_EXECUTOR]] :
|
||||
let _: String = try await p.tryRequestString()
|
||||
}
|
||||
|
||||
class SlowSwiftServer: NSObject, SlowServing {
|
||||
// CHECK-LABEL: sil {{.*}} @$s21objc_async_from_swift15SlowSwiftServerC10requestIntSiyYaF
|
||||
// CHECK: [[GENERIC_EXECUTOR:%.*]] = enum $Optional<Builtin.Executor>, #Optional.none
|
||||
|
||||
Reference in New Issue
Block a user