• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
2
3// Make sure we generate debug symbols for an indirectly referenced
4// extension to an interface.
5
6// This happens to be the order the members are emitted in... I'm assuming it's
7// not meaningful/important, so if something causes the order to change, feel
8// free to update the test to reflect the new order.
9// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "a"
10// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "d"
11// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "c"
12// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "b"
13
14@interface I
15{
16    @public int a;
17}
18@end
19
20void foo(I* pi) {
21    int _a = pi->a;
22}
23
24// another layer of indirection
25struct S
26{
27    I* i;
28};
29
30@interface I()
31{
32    @public int b;
33}
34@end
35
36void gorf (struct S* s) {
37    int _b = s->i->b;
38}
39
40
41I *source();
42
43@interface I()
44{
45    @public int c;
46}
47@end
48
49void use() {
50    int _c = source()->c;
51}
52
53@interface I()
54{
55    @public int d;
56}
57@end
58
59I *x();
60