Files
swift-mirror/test/IRGen/objc_runtime_visible.sil
Michael Gottesman fd4828e40a Eliminate -assume-parsing-unqualified-ownership-sil from tests.
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00

21 lines
689 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 %objc_class* @getClassA() #0 {
sil @getClassA : $@convention(thin) () -> @objc_metatype A.Type {
bb0:
// CHECK: call %objc_class* @objc_lookUpClass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[CLASS_NAME]],
%0 = metatype $@objc_metatype A.Type
// CHECK-NEXT: ret %objc_class*
return %0 : $@objc_metatype A.Type
}