mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Instead, use the `%target-swift-5.1-abi-triple` substitution to compile the tests for deployment to the minimum OS versions required for use of _Concurrency APIs.
24 lines
1.1 KiB
Swift
24 lines
1.1 KiB
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target %target-swift-5.1-abi-triple -target %target-swift-5.8-abi-triple -import-objc-header %S/Inputs/Delegate.h %s -emit-ir -o - | %FileCheck %s -DALIGNMENT=%target-alignment --check-prefix=CHECK-%is-darwin
|
|
|
|
// REQUIRES: concurrency
|
|
// REQUIRES: objc_interop
|
|
|
|
|
|
let anyObject: AnyObject = (MyAsyncProtocol.self as AnyObject) // or something like this
|
|
|
|
// rdar://76192003
|
|
// Make sure we don't emit 2 copies of methods, due to a completion-handler
|
|
// version and another due to an async based version.
|
|
|
|
// CHECK-isNotDarwin-LABEL: @_PROTOCOL_INSTANCE_METHODS_MyAsyncProtocol = weak hidden constant
|
|
// CHECK-isNotDarwin-SAME: selector_data(myAsyncMethod:)
|
|
// CHECK-isNotDarwin-NOT: selector_data(myAsyncMethod:)
|
|
// CHECK-isNotDarwin-SAME: align [[ALIGNMENT]]
|
|
|
|
|
|
// CHECK-isDarwin: @OBJC_METH_VAR_NAME_ = private unnamed_addr constant [15 x i8] c"myAsyncMethod:\00"
|
|
// CHECK-isDarwin: @"_OBJC_$_PROTOCOL_INSTANCE_METHODS_MyAsyncProtocol" =
|
|
// CHECK-isDarwin-SAME: [1 x %struct._objc_method]
|
|
// CHECK-isDarwin-SAME: @OBJC_METH_VAR_NAME_
|
|
// CHECK-isDarwin-SAME: align [[ALIGNMENT]]
|