blob: af7ad26d2f4bc4fa1e109bd895bb398dc52b7487 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep -e "{Base=b2b3b4b5}" %t | count 1
Fariborz Jahanian8b4bf902009-01-13 01:18:13 +00003// RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1
4
5enum 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
26int 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}