blob: 982faf03bad6c1ca5095e658274c211af11edd16 [file] [log] [blame]
Fariborz Jahaniane4bb68a2008-12-19 17:45:06 +00001// RUN: clang -fnext-runtime -emit-llvm -o %t %s &&
Fariborz Jahanian43822ea2008-12-19 23:34:38 +00002// RUN: grep -e "\^{Innermost=CC}" %t | count 1 &&
3// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1
Fariborz Jahaniane4bb68a2008-12-19 17:45:06 +00004
5@class Int1;
6
7struct 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 Jahanian43822ea2008-12-19 23:34:38 +000019
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
51int main()
52{
53 const char *en = @encode(Derived);
54}
55