Daniel Dunbar | c5a97ec | 2009-11-17 07:07:28 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -triple=i686-apple-darwin9 -emit-llvm -o %t %s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep -e "{Base=b2b3b4b5}" %t | count 1 |
Fariborz Jahanian | 8b4bf90 | 2009-01-13 01:18:13 +0000 | [diff] [blame] | 3 | // RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1 |
| 4 | |
| 5 | enum Enum { one, two, three, four }; |
| 6 | |
| 7 | @interface Base { |
| 8 | unsigned a: 2; |
| 9 | int b: 3; |
| 10 | enum Enum c: 4; |
| 11 | unsigned d: 5; |
| 12 | } |
| 13 | @end |
| 14 | |
| 15 | @interface Derived: Base { |
| 16 | signed e: 5; |
| 17 | int f: 4; |
| 18 | enum Enum g: 3; |
| 19 | } |
| 20 | @end |
| 21 | |
| 22 | @implementation Base @end |
| 23 | |
| 24 | @implementation Derived @end |
| 25 | |
| 26 | int main(void) |
| 27 | { |
| 28 | |
| 29 | const char *en = @encode(Base); |
| 30 | // printf ("%s\n", en); |
| 31 | |
| 32 | const char *ed = @encode(Derived); |
| 33 | // printf ("%s\n", ed); |
| 34 | |
| 35 | return 0; |
| 36 | } |