Fariborz Jahanian | e4bb68a | 2008-12-19 17:45:06 +0000 | [diff] [blame] | 1 | // RUN: clang -fnext-runtime -emit-llvm -o %t %s && |
Fariborz Jahanian | 43822ea | 2008-12-19 23:34:38 +0000 | [diff] [blame^] | 2 | // RUN: grep -e "\^{Innermost=CC}" %t | count 1 && |
| 3 | // RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 |
Fariborz Jahanian | e4bb68a | 2008-12-19 17:45:06 +0000 | [diff] [blame] | 4 | |
| 5 | @class Int1; |
| 6 | |
| 7 | struct Innermost { |
| 8 | unsigned char a, b; |
| 9 | }; |
| 10 | |
| 11 | @interface Int1 { |
| 12 | signed char a, b; |
| 13 | struct Innermost *innermost; |
| 14 | } |
| 15 | @end |
| 16 | |
| 17 | @implementation Int1 |
| 18 | @end |
Fariborz Jahanian | 43822ea | 2008-12-19 23:34:38 +0000 | [diff] [blame^] | 19 | |
| 20 | @interface Base |
| 21 | { |
| 22 | struct objc_class *isa; |
| 23 | int full; |
| 24 | int full2: 32; |
| 25 | int _refs: 8; |
| 26 | int field2: 3; |
| 27 | unsigned f3: 8; |
| 28 | short cc; |
| 29 | unsigned g: 16; |
| 30 | int r2: 8; |
| 31 | int r3: 8; |
| 32 | int r4: 2; |
| 33 | int r5: 8; |
| 34 | char c; |
| 35 | } |
| 36 | @end |
| 37 | |
| 38 | @interface Derived: Base |
| 39 | { |
| 40 | char d; |
| 41 | int _field3: 6; |
| 42 | } |
| 43 | @end |
| 44 | |
| 45 | @implementation Base |
| 46 | @end |
| 47 | |
| 48 | @implementation Derived |
| 49 | @end |
| 50 | |
| 51 | int main() |
| 52 | { |
| 53 | const char *en = @encode(Derived); |
| 54 | } |
| 55 | |