2019-05-10 02:32:16 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-10.14 -emit-llvm -x objective-c %s -o - | FileCheck %s
|
2014-03-04 05:53:57 +08:00
|
|
|
// rdar://16203115
|
|
|
|
|
|
|
|
@interface NSObject @end
|
|
|
|
|
2018-08-18 06:18:08 +08:00
|
|
|
@protocol P0 @end
|
2014-03-04 05:53:57 +08:00
|
|
|
|
|
|
|
@interface A : NSObject <P0>
|
|
|
|
+(Class) getClass;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation A
|
|
|
|
+(Class) getClass { return self; }
|
|
|
|
@end
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
Protocol *P0 = @protocol(P0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-03-14 23:17:37 +08:00
|
|
|
// CHECK: @"_OBJC_PROTOCOL_$_P0" = weak hidden global
|
|
|
|
// CHECK: @"_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
|
2019-05-10 01:43:52 +08:00
|
|
|
// CHECK: @"_OBJC_CLASS_PROTOCOLS_$_A" = internal global
|
|
|
|
// CHECK: @"_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
|
2014-03-07 06:02:16 +08:00
|
|
|
|
2018-01-24 03:35:51 +08:00
|
|
|
// CHECK: llvm.used = appending global [3 x i8*]
|
2019-03-14 23:17:37 +08:00
|
|
|
// CHECK-SAME: "_OBJC_PROTOCOL_$_P0"
|
|
|
|
// CHECK-SAME: "_OBJC_LABEL_PROTOCOL_$_P0"
|
2019-05-10 01:43:52 +08:00
|
|
|
// CHECK-SAME: "_OBJC_PROTOCOL_REFERENCE_$_P0"
|
2018-01-24 03:35:51 +08:00
|
|
|
|
|
|
|
// CHECK: llvm.compiler.used = appending global [7 x i8*]
|
2018-01-24 01:57:04 +08:00
|
|
|
// CHECK-SAME: OBJC_CLASS_NAME_
|
|
|
|
// CHECK-SAME: OBJC_METH_VAR_NAME_
|
|
|
|
// CHECK-SAME: OBJC_METH_VAR_TYPE_
|
2019-05-10 01:43:52 +08:00
|
|
|
// CHECK-SAME: "_OBJC_$_CLASS_METHODS_A"
|
2018-01-24 01:57:04 +08:00
|
|
|
// CHECK-SAME: OBJC_CLASS_NAME_.1
|
2019-05-10 01:43:52 +08:00
|
|
|
// CHECK-SAME: "_OBJC_CLASS_PROTOCOLS_$_A"
|
2018-01-24 01:57:04 +08:00
|
|
|
// CHECK-SAME: "OBJC_LABEL_CLASS_$"
|
|
|
|
// CHECK-SAME: section "llvm.metadata"
|