1 // RUN: %clang_cc1 -triple x86_64-unk-unk -fno-limit-debug-info -o - -emit-llvm -g %s | FileCheck %s 2 3 namespace 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] 8 struct foo { 9 }; 10 11 typedef foo *foop; 12 13 void bar() { 14 foop f; 15 } 16 } 17 18 namespace 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] 23 struct foo; 24 void bar() { 25 foo *f; 26 } 27 struct foo { 28 }; 29 } 30 31