// RUN: %clang_cc1 -DSETATTR=0 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=DEBUG
// RUN: %clang_cc1 -DSETATTR=1 -triple x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=constructor %s -o - | FileCheck %s --check-prefix=WITHATTR
// Use -debug-info-kind=constructor because it includes all the optimizations.
;
void
// DEBUG: !DICompositeType({{.*}}name: "StructWithConstructor"
// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
// WITHATTR: !DICompositeType({{.*}}name: "StructWithConstructor"
// WITHATTR-NOT: DIFlagFwdDecl
;
void
// DEBUG: !DICompositeType({{.*}}name: "UnionWithConstructor"
// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
// WITHATTR: !DICompositeType({{.*}}name: "UnionWithConstructor"
// WITHATTR-NOT: DIFlagFwdDecl
;
extern ;
void
// DEBUG: !DICompositeType({{.*}}name: "ExternTemplate<int>"
// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
// WITHATTR: !DICompositeType({{.*}}name: "ExternTemplate<int>"
// WITHATTR-NOT: DIFlagFwdDecl
;
void
// DEBUG: !DICompositeType({{.*}}name: "CompleteTypeRequired"
// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
// WITHATTR: !DICompositeType({{.*}}name: "CompleteTypeRequired"
// WITHATTR-NOT: DIFlagFwdDecl
struct STANDALONEDEBUGATTR Redecl;
;
void
// DEBUG: !DICompositeType({{.*}}name: "Redecl"
// DEBUG-SAME: flags: {{.*}}DIFlagFwdDecl
// WITHATTR: !DICompositeType({{.*}}name: "Redecl"
// WITHATTR-NOT: DIFlagFwdDecl