Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-fwd-template-param.cpp
blob2983f842744a1c507e1e02e8e2e4249488045160
1 // RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -debug-forward-template-params -emit-llvm -o - | FileCheck --check-prefix=CHILD %s
2 // RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -emit-llvm -o - | FileCheck --check-prefix=NONE %s
3 // A DWARF forward declaration of a template instantiation should have template
4 // parameter children (if we ask for them).
6 template<typename T> class A;
7 A<int> *p;
9 // CHILD: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"
10 // CHILD-SAME: flags: DIFlagFwdDecl
11 // CHILD-SAME: templateParams: [[PARAM_LIST:![0-9]*]]
12 // CHILD: [[PARAM_LIST]] = !{[[PARAM:![0-9]*]]}
13 // CHILD: [[PARAM]] = !DITemplateTypeParameter(name: "T",
14 // CHILD-SAME: type: [[BTYPE:![0-9]*]]
15 // CHILD: [[BTYPE]] = !DIBasicType(name: "int"
17 // NONE: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"
18 // NONE-SAME: flags: DIFlagFwdDecl
19 // NONE-NOT: templateParams:
20 // NONE-SAME: )