Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
      2 
      3 // Make sure we generate debug symbols for ivars added by a class extension.
      4 
      5 @interface I
      6 {
      7     @public int a;
      8 }
      9 @end
     10 
     11 void foo(I* pi) {
     12     // poking into pi for primary class ivars.
     13     int _a = pi->a;
     14 }
     15 
     16 @interface I()
     17 {
     18     @public int b;
     19 }
     20 @end
     21 
     22 void gorf (I* pg) {
     23     // poking into pg for ivars for class extension
     24     int _b = pg->b;
     25 }
     26 
     27 // CHECK: {{.*}} [ DW_TAG_structure_type ] [I]
     28 // Check for "a".
     29 // CHECK: {{.*}} [ DW_TAG_member ] [a] [line 7, size 32, align 32, offset 0] [from int]
     30 // Make sure we don't output the same type twice.
     31 // CHECK-NOT: {{.*}} [ DW_TAG_structure_type ] [I]
     32 // Check for "b".
     33 // CHECK: {{.*}} [ DW_TAG_member ] [b] [line 18, size 32, align 32, offset 0] [from int]
     34