blob: 3f28296318c9a8d0d99c766727d6b712ace590d3 [file] [log] [blame]
// RUN: %clang_cc1 -triple x86_64-unk-unk -fno-limit-debug-info -o - -emit-llvm -g %s | FileCheck %s
// Check that we emit debug info for a struct even if it is typedef'd before using.
// rdar://problem/14101097
//
// FIXME: This should work with -flimit-debug-info, too.
// Make sure this is not a forward declaration.
// CHECK-NOT: [ DW_TAG_structure_type ] [elusive_s] {{.*}} [fwd]
// CHECK: [ DW_TAG_member ] [foo]
// CHECK: [ DW_TAG_member ] [bar]
typedef struct elusive_s* elusive_t;
elusive_t first_use = (void*)0;
struct elusive_s {
int foo;
float bar;
};
int baz(void* x) {
elusive_t s = x;
return s->foo;
}