Files
swift-mirror/test/IRGen/objc_runtime_visible.sil
2023-06-23 06:57:37 -07:00

21 lines
616 B
Plaintext

// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
sil_stage raw
import Builtin
import Swift
import SwiftShims
import ObjCRuntimeVisible
// CHECK: [[CLASS_NAME:@.*]] = private unnamed_addr constant [22 x i8] c"MyRuntimeVisibleClass\00"
// CHECK: define {{(dllexport )?}}{{(protected )?}}swiftcc ptr @getClassA() #0 {
sil @getClassA : $@convention(thin) () -> @objc_metatype A.Type {
bb0:
// CHECK: call ptr @objc_lookUpClass(ptr [[CLASS_NAME]])
%0 = metatype $@objc_metatype A.Type
// CHECK-NEXT: ret ptr
return %0 : $@objc_metatype A.Type
}