| 1 |
// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \ |
| 2 |
// RUN: | FileCheck %s |
| 3 |
|
| 4 |
//// Check that -gtemplate-alias causes DW_TAG_template_alias emission for |
| 5 |
//// variadic template aliases. See template-alias.cpp for more template alias |
| 6 |
//// tests. |
| 7 |
|
| 8 |
template<typename Y, int Z> |
| 9 |
struct X { |
| 10 |
Y m1 = Z; |
| 11 |
}; |
| 12 |
|
| 13 |
template<int I, typename... Ts> |
| 14 |
using A = X<Ts..., I>; |
| 15 |
|
| 16 |
A<5, int> a; |
| 17 |
|
| 18 |
// CHECK: !DIDerivedType(tag: DW_TAG_template_alias, name: "A", file: ![[#]], line: [[#]], baseType: ![[baseType:[0-9]+]], extraData: ![[extraData:[0-9]+]]) |
| 19 |
// CHECK: ![[baseType]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "X", |
| 20 |
// CHECK: ![[int:[0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 21 |
// CHECK: ![[extraData]] = !{![[I:[0-9]+]], ![[Ts:[0-9]+]]} |
| 22 |
// CHECK: ![[I]] = !DITemplateValueParameter(name: "I", type: ![[int]], value: i32 5) |
| 23 |
// CHECK: ![[Ts]] = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "Ts", value: ![[types:[0-9]+]]) |
| 24 |
// CHECK: ![[types]] = !{![[int_template_param:[0-9]+]]} |
| 25 |
// CHECK: ![[int_template_param]] = !DITemplateTypeParameter(type: ![[int]]) |