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 | |
| 4 | // CHECK: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" = private global {{.*}} section "__DATA, __objc_const", align 8 |
| 5 | // CHECK: @"\01l_OBJC_$_CATEGORY_Foo_$_Category" = private global %struct._category_t { {{.*}} @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_$_Category" {{.*}} }, section "__DATA, __objc_const", align 8 |
| 6 | |
| 7 | // CHECK: !{i32 1, !"Objective-C Class Properties", i32 64} |
| 8 | |
| 9 | // CHECK-FRAGILE: @"\01l_OBJC_$_CLASS_PROP_LIST_Foo_Category" = private global {{.*}} section "__OBJC,__property,regular,no_dead_strip", align 8 |
| 10 | // 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 |
| 11 | |
| 12 | // CHECK-FRAGILE: !{i32 1, !"Objective-C Class Properties", i32 64} |
| 13 | |
| 14 | @interface Foo @end |
| 15 | |
| 16 | @protocol Proto |
| 17 | @property (class, readonly) int proto_property; |
| 18 | @end |
| 19 | |
| 20 | @interface Foo (Category) <Proto> @end |
| 21 | |
| 22 | @implementation Foo (Category) |
| 23 | +(int)proto_property { return 0; } |
| 24 | @end |