Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
      2 // RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
      3 // rdar: // 7824380
      4 
      5 @interface Super {
      6   int ivar_super_a : 5;
      7 }
      8 @end
      9 
     10 @interface A : Super {
     11 @public
     12   int ivar_a : 5;
     13 }
     14 @end
     15 
     16 int f0(A *a) {
     17   return a->ivar_a;
     18 }
     19 
     20 @interface A () {
     21 @public
     22   int ivar_ext_a : 5;
     23   int ivar_ext_b : 5;
     24 }@end
     25 
     26 int f1(A *a) {
     27   return a->ivar_ext_a + a->ivar_a;
     28 }
     29 
     30 @interface A () {
     31 @public
     32   int ivar_ext2_a : 5;
     33   int ivar_ext2_b : 5;
     34 }@end
     35 
     36 int f2(A* a) {
     37   return a->ivar_ext2_a + a->ivar_ext_a + a->ivar_a;
     38 }
     39 
     40 @implementation A {
     41 @public
     42   int ivar_b : 5;
     43   int ivar_c : 5;
     44   int ivar_d : 5;
     45 }
     46 @end
     47 
     48 int f3(A *a) {  
     49   return a->ivar_d + a->ivar_ext2_a + a->ivar_ext_a + a->ivar_a;
     50 }
     51 
     52