phunix/external/bsd/llvm/dist/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

60 lines
922 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s
// Make sure we generate debug symbols for an indirectly referenced
// extension to an interface.
// 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.
// CHECK: ; [ DW_TAG_member ] [a]
// CHECK: ; [ DW_TAG_member ] [d]
// CHECK: ; [ DW_TAG_member ] [c]
// CHECK: ; [ DW_TAG_member ] [b]
@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;
}
I *source();
@interface I()
{
@public int c;
}
@end
void use() {
int _c = source()->c;
}
@interface I()
{
@public int d;
}
@end
I *x();