Manman Ren | 96df0b3 | 2016-01-29 23:45:01 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s |
| 2 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - -fobjc-runtime=macosx-fragile-10.5 %s | FileCheck -check-prefix=CHECK-FRAGILE %s |
| 3 | |
Manman Ren | ce7bff5 | 2016-01-29 23:46:55 +0000 | [diff] [blame^] | 4 | // CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_Proto" = private global {{.*}} section "__DATA, __objc_const", align 8 |
| 5 | // CHECK: @"\01l_OBJC_PROTOCOL_$_Proto" = {{.*}} global %struct._protocol_t { {{.*}} i32 96, i32 {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Proto" {{.*}} } |
Manman Ren | 96df0b3 | 2016-01-29 23:45:01 +0000 | [diff] [blame] | 6 | // CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = private global {{.*}} section "__DATA, __objc_const", align 8 |
| 7 | // CHECK: @"\01l_OBJC_$_CATEGORY_Foo_$_Category" = private global %struct._category_t { {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" {{.*}} }, section "__DATA, __objc_const", align 8 |
| 8 | |
| 9 | // CHECK: !{i32 1, !"Objective-C Class Properties", i32 64} |
| 10 | |
Manman Ren | ce7bff5 | 2016-01-29 23:46:55 +0000 | [diff] [blame^] | 11 | // CHECK-FRAGILE: @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8 |
| 12 | // CHECK-FRAGILE: @"\01l_OBJC_PROTOCOLEXT_Proto" = private global %struct._objc_protocol_extension { i32 48, {{.*}} @"OBJC_$_CLASS_PROP_PROTO_LIST_Proto" {{.*}} }, align 8 |
Manman Ren | 96df0b3 | 2016-01-29 23:45:01 +0000 | [diff] [blame] | 13 | // CHECK-FRAGILE: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_Category" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8 |
| 14 | // CHECK-FRAGILE: @OBJC_CATEGORY_Foo_Category = private global %struct._objc_category { {{.*}}, i32 64, {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_Category" {{.*}} }, section "__OBJC,__category,regular,no_dead_strip", align 8 |
| 15 | |
| 16 | // CHECK-FRAGILE: !{i32 1, !"Objective-C Class Properties", i32 64} |
| 17 | |
| 18 | @interface Foo @end |
| 19 | |
| 20 | @protocol Proto |
| 21 | @property (class, readonly) int proto_property; |
| 22 | @end |
| 23 | |
| 24 | @interface Foo (Category) <Proto> @end |
| 25 | |
| 26 | @implementation Foo (Category) |
| 27 | +(int)proto_property { return 0; } |
| 28 | @end |