2013-03-07 06:03:30 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
2013-03-20 07:10:14 +08:00
|
|
|
// CHECK: {{.*}} [ DW_TAG_structure_type ] [I]
|
2013-03-12 02:33:46 +08:00
|
|
|
// Check for "a".
|
2014-08-30 06:44:27 +08:00
|
|
|
// CHECK: {{.*}} [ DW_TAG_member ] [a] [line 7, size 32, align 32, offset 0] [public] [from int]
|
2013-03-12 02:33:46 +08:00
|
|
|
// Make sure we don't output the same type twice.
|
2013-03-20 07:10:14 +08:00
|
|
|
// CHECK-NOT: {{.*}} [ DW_TAG_structure_type ] [I]
|
2013-03-12 02:33:46 +08:00
|
|
|
// Check for "b".
|
2014-08-30 06:44:27 +08:00
|
|
|
// CHECK: {{.*}} [ DW_TAG_member ] [b] [line 18, size 32, align 32, offset 0] [public] [from int]
|