1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-10.14 -emit-llvm -x objective-c %s -o - | FileCheck %s
3 @interface NSObject @end
7 @interface A : NSObject <P0>
12 +(Class) getClass { return self; }
16 Protocol *P0 = @protocol(P0);
20 // CHECK: @"_OBJC_PROTOCOL_$_P0" = weak hidden global
21 // CHECK: @"_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
22 // CHECK: @"_OBJC_CLASS_PROTOCOLS_$_A" = internal global
23 // CHECK: @"_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
25 // CHECK: llvm.used = appending global [3 x ptr]
26 // CHECK-SAME: "_OBJC_PROTOCOL_$_P0"
27 // CHECK-SAME: "_OBJC_LABEL_PROTOCOL_$_P0"
28 // CHECK-SAME: "_OBJC_PROTOCOL_REFERENCE_$_P0"
30 // CHECK: llvm.compiler.used = appending global [7 x ptr]
31 // CHECK-SAME: OBJC_CLASS_NAME_
32 // CHECK-SAME: OBJC_METH_VAR_NAME_
33 // CHECK-SAME: OBJC_METH_VAR_TYPE_
34 // CHECK-SAME: "_OBJC_$_CLASS_METHODS_A"
35 // CHECK-SAME: OBJC_CLASS_NAME_.1
36 // CHECK-SAME: "_OBJC_CLASS_PROTOCOLS_$_A"
37 // CHECK-SAME: "OBJC_LABEL_CLASS_$"
38 // CHECK-SAME: section "llvm.metadata"