blob: ce72bd347cab521277ef0e15f79bf2fd1ff5261f [file] [log] [blame]
David Blaikie03039fe2013-06-21 03:41:46 +00001// RUN: %clang_cc1 -triple x86_64-unk-unk -fno-limit-debug-info -o - -emit-llvm -g %s | FileCheck %s
2
3namespace rdar14101097_1 { // see also PR16214
4// Check that we emit debug info for the definition of a struct if the
5// definition is available, even if it's used via a pointer wrapped in a
6// typedef.
7// CHECK: [ DW_TAG_structure_type ] [foo] {{.*}}[def]
8struct foo {
9};
10
11typedef foo *foop;
12
13void bar() {
14 foop f;
15}
16}
17
18namespace rdar14101097_2 {
19// As above, except trickier because we first encounter only a declaration of
20// the type and no debug-info related use after we see the definition of the
21// type.
22// CHECK: [ DW_TAG_structure_type ] [foo] {{.*}}[def]
23struct foo;
24void bar() {
25 foo *f;
26}
27struct foo {
28};
29}
30