1 | // RUN: %clang_cc1 -S -emit-llvm -fobjc-runtime=gcc -o - %s | FileCheck %s |
2 | |
3 | @protocol NSCopying |
4 | @end |
5 | |
6 | @interface NSObject { |
7 | struct objc_object *isa; |
8 | } |
9 | + (id) new; |
10 | - (id) init; |
11 | @end |
12 | |
13 | @interface NSString : NSObject <NSCopying> |
14 | + (NSString *)foo; |
15 | @end |
16 | |
17 | @interface TestClass : NSObject { |
18 | @public |
19 | NSString *_stringIvar; |
20 | int _intIvar; |
21 | } |
22 | @end |
23 | @implementation TestClass |
24 | |
25 | @end |
26 | |
27 | int main() { |
28 | TestClass *c = [TestClass new]; |
29 | return 0; |
30 | } |
31 | |
32 | // CHECK: = private unnamed_addr constant [12 x i8] c"_stringIvar\00" |
33 | // CHECK: = private unnamed_addr constant [12 x i8] c"@\22NSString\22\00" |
34 | // CHECK: = private unnamed_addr constant [9 x i8] c"_intIvar\00" |
35 | // CHECK: = private unnamed_addr constant [2 x i8] c"i\00" |
36 | |
37 | @interface Class1 { |
38 | int : 3; |
39 | short : 2; |
40 | long long ll; |
41 | char : 1; |
42 | } |
43 | @end |
44 | |
45 | @implementation Class1 |
46 | @end |
47 | |
48 | // CHECK: @{{.*}} = private unnamed_addr constant [5 x i8] c"b0i3\00" |
49 | // CHECK: @{{.*}} = private unnamed_addr constant [5 x i8] c"b3s2\00" |
50 | // CHECK: @{{.*}} = private unnamed_addr constant [2 x i8] c"q\00" |
51 | // CHECK: @{{.*}} = private unnamed_addr constant [{{7|6}} x i8] c"b{{128|96}}c1\00" |
52 | |