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 an indirectly referenced
|
|
|
|
// extension to an interface.
|
|
|
|
|
2014-05-06 07:23:53 +08:00
|
|
|
// This happens to be the order the members are emitted in... I'm assuming it's
|
|
|
|
// not meaningful/important, so if something causes the order to change, feel
|
|
|
|
// free to update the test to reflect the new order.
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
|
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "d"
|
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "c"
|
|
|
|
// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
|
2014-05-06 07:23:53 +08:00
|
|
|
|
2013-03-07 06:03:30 +08:00
|
|
|
@interface I
|
|
|
|
{
|
|
|
|
@public int a;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void foo(I* pi) {
|
|
|
|
int _a = pi->a;
|
|
|
|
}
|
|
|
|
|
|
|
|
// another layer of indirection
|
|
|
|
struct S
|
|
|
|
{
|
|
|
|
I* i;
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface I()
|
|
|
|
{
|
|
|
|
@public int b;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void gorf (struct S* s) {
|
|
|
|
int _b = s->i->b;
|
|
|
|
}
|
|
|
|
|
2014-05-06 07:23:50 +08:00
|
|
|
|
|
|
|
I *source();
|
|
|
|
|
|
|
|
@interface I()
|
|
|
|
{
|
|
|
|
@public int c;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
void use() {
|
|
|
|
int _c = source()->c;
|
|
|
|
}
|
2014-05-06 07:23:53 +08:00
|
|
|
|
|
|
|
@interface I()
|
|
|
|
{
|
|
|
|
@public int d;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
I *x();
|