2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
|
2013-03-07 06:03:30 +08:00
|
|
|
|
|
|
|
// Make sure we generate debug symbols for ivars added by a class extension.
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
{
|
|
|
|
@public int a;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void foo(I* pi) {
|
|
|
|
// poking into pi for primary class ivars.
|
|
|
|
int _a = pi->a;
|
|
|
|
}
|
|
|
|
|
|
|
|
@interface I()
|
|
|
|
{
|
|
|
|
@public int b;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void gorf (I* pg) {
|
|
|
|
// poking into pg for ivars for class extension
|
|
|
|
int _b = pg->b;
|
|
|
|
}
|
|
|
|
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
|
2015-03-04 01:25:55 +08:00
|
|
|
|
2013-03-12 02:33:46 +08:00
|
|
|
// Check for "a".
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: 7
|
|
|
|
// CHECK-SAME: baseType: ![[INT:[0-9]+]]
|
|
|
|
// CHECK-SAME: size: 32, align: 32
|
|
|
|
// CHECK-NOT: offset:
|
|
|
|
// CHECK-SAME: flags: DIFlagPublic
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[INT]] = !DIBasicType(name: "int"
|
2015-03-04 01:25:55 +08:00
|
|
|
|
2013-03-12 02:33:46 +08:00
|
|
|
// Make sure we don't output the same type twice.
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type, name: "I"
|
2015-03-04 01:25:55 +08:00
|
|
|
|
2013-03-12 02:33:46 +08:00
|
|
|
// Check for "b".
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
|
2015-03-04 01:25:55 +08:00
|
|
|
// CHECK-SAME: line: 18
|
|
|
|
// CHECK-SAME: baseType: ![[INT]]
|
|
|
|
// CHECK-SAME: size: 32, align: 32
|
|
|
|
// CHECK-NOT: offset:
|
|
|
|
// CHECK-SAME: flags: DIFlagPublic
|