48 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s2 3// Make sure we generate debug symbols for ivars added by a class extension.4 5@interface I6{7 @public int a;8}9@end10 11void 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@end21 22void gorf (I* pg) {23 // poking into pg for ivars for class extension24 int _b = pg->b;25}26 27// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"28 29// Check for "a".30// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"31// CHECK-SAME: line: 732// CHECK-SAME: baseType: ![[INT:[0-9]+]]33// CHECK-SAME: size: 3234// CHECK-NOT: offset:35// CHECK-SAME: flags: DIFlagPublic36// CHECK: ![[INT]] = !DIBasicType(name: "int"37 38// Make sure we don't output the same type twice.39// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "I"40 41// Check for "b".42// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"43// CHECK-SAME: line: 1844// CHECK-SAME: baseType: ![[INT]]45// CHECK-SAME: size: 3246// CHECK-NOT: offset:47// CHECK-SAME: flags: DIFlagPublic48