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