mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
25 lines
675 B
Plaintext
25 lines
675 B
Plaintext
// RUN: %empty-directory(%t)
|
|
// RUN: %build-irgen-test-overlays
|
|
// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
|
|
|
|
// REQUIRES: CPU=x86_64
|
|
// REQUIRES: objc_interop
|
|
|
|
sil_stage canonical
|
|
|
|
import Swift
|
|
import ObjectiveC
|
|
|
|
@objc protocol OP {}
|
|
|
|
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc ptr @protocol_conversion() {{.*}} {
|
|
// CHECK: %0 = load ptr, ptr @"\01l_OBJC_PROTOCOL_REFERENCE_$__TtP24objc_protocol_conversion2OP_", align 8
|
|
// CHECK: ret ptr %0
|
|
// CHECK: }
|
|
|
|
sil @protocol_conversion : $@convention(thin) () -> @owned Protocol {
|
|
entry:
|
|
%p = objc_protocol #OP : $Protocol
|
|
return %p : $Protocol
|
|
}
|