|
3 | 3 |
|
4 | 4 | ; C++ source to regenerate:
|
5 | 5 |
|
6 |
| -;template <typename T = char, int i = 3 > |
| 6 | +;template <typename T = char, int i = 3, float f = 1.0f, double d = 2.0> |
7 | 7 | ;class foo {
|
8 | 8 | ;};
|
9 | 9 | ;
|
10 | 10 | ;int main() {
|
11 |
| -; foo<int,6> f1; |
| 11 | +; foo<int, 6, 1.9f, 1.9> f1; |
12 | 12 | ; foo<> f2;
|
13 | 13 | ; return 0;
|
14 | 14 | ;}
|
|
20 | 20 |
|
21 | 21 | ; CHECK: debug_info contents:
|
22 | 22 |
|
23 |
| -; CHECK: DW_AT_name {{.*}} "foo<int, 6>" |
| 23 | +; CHECK: DW_AT_name {{.*}} "foo<int, 6, 1.900000e+00, 1.900000e+00>" |
24 | 24 | ; CHECK: DW_AT_type {{.*}} "int"
|
25 | 25 | ; CHECK-NEXT: DW_AT_name {{.*}} "T"
|
26 | 26 | ; CHECK-NOT: DW_AT_default_value
|
27 | 27 | ; CHECK: DW_AT_type {{.*}} "int"
|
28 | 28 | ; CHECK-NEXT: DW_AT_name {{.*}} "i"
|
| 29 | +; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata] (6) |
| 30 | +; CHECK-NOT: DW_AT_default_value |
| 31 | +; CHECK: DW_AT_type {{.*}} "float" |
| 32 | +; CHECK-NEXT: DW_AT_name {{.*}} "f" |
| 33 | +; CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (1072902963) |
| 34 | +; CHECK-NOT: DW_AT_default_value |
| 35 | +; CHECK: DW_AT_type {{.*}} "double" |
| 36 | +; CHECK-NEXT: DW_AT_name {{.*}} "d" |
| 37 | +; CHECK-NEXT: DW_AT_const_value [DW_FORM_udata] (4611235658464650854) |
29 | 38 | ; CHECK-NOT: DW_AT_default_value
|
30 | 39 |
|
31 |
| -; CHECK: DW_AT_name {{.*}} "foo<char, 3>" |
| 40 | +; CHECK: DW_AT_name {{.*}} "foo<char, 3, 1.000000e+00, 2.000000e+00>" |
32 | 41 | ; CHECK: DW_AT_type {{.*}} "char"
|
33 | 42 | ; CHECK-NEXT: DW_AT_name {{.*}} "T"
|
34 | 43 | ; CHECK-NEXT: DW_AT_default_value {{.*}} (true)
|
35 | 44 | ; CHECK: DW_AT_type {{.*}} "int"
|
36 | 45 | ; CHECK-NEXT: DW_AT_name {{.*}} "i"
|
37 | 46 | ; CHECK-NEXT: DW_AT_default_value {{.*}} (true)
|
| 47 | +; CHECK: DW_AT_type {{.*}} "float" |
| 48 | +; CHECK-NEXT: DW_AT_name {{.*}} "f" |
| 49 | +; CHECK-NEXT: DW_AT_default_value {{.*}} (true) |
| 50 | +; CHECK: DW_AT_type {{.*}} "double" |
| 51 | +; CHECK-NEXT: DW_AT_name {{.*}} "d" |
| 52 | +; CHECK-NEXT: DW_AT_default_value {{.*}} (true) |
38 | 53 |
|
39 | 54 | ; ModuleID = '/dir/test.cpp'
|
40 | 55 | source_filename = "test.cpp"
|
@@ -76,16 +91,22 @@ attributes #1 = { nounwind readnone speculatable willreturn }
|
76 | 91 | !9 = !{!10}
|
77 | 92 | !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
78 | 93 | !11 = !DILocalVariable(name: "f1", scope: !7, file: !1, line: 30, type: !12)
|
79 |
| -!12 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "foo<int, 6>", file: !1, line: 26, size: 8, flags: DIFlagTypePassByValue, elements: !2, templateParams: !13, identifier: "_ZTS3fooIiLi6EE") |
80 |
| -!13 = !{!14, !15} |
| 94 | +!12 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "foo<int, 6, 1.900000e+00, 1.900000e+00>", file: !1, line: 26, size: 8, flags: DIFlagTypePassByValue, elements: !2, templateParams: !13, identifier: "_ZTS3fooIiLi6ELf3ff33333ELd3ffe666666666666EE") |
| 95 | +!13 = !{!14, !15, !25, !27} |
81 | 96 | !14 = !DITemplateTypeParameter(name: "T", type: !10)
|
82 | 97 | !15 = !DITemplateValueParameter(name: "i", type: !10, value: i32 6)
|
83 | 98 | !16 = !DILocation(line: 30, column: 14, scope: !7)
|
84 | 99 | !17 = !DILocalVariable(name: "f2", scope: !7, file: !1, line: 31, type: !18)
|
85 |
| -!18 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "foo<char, 3>", file: !1, line: 26, size: 8, flags: DIFlagTypePassByValue, elements: !2, templateParams: !19, identifier: "_ZTS3fooIcLi3EE") |
86 |
| -!19 = !{!20, !22} |
| 100 | +!18 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "foo<char, 3, 1.000000e+00, 2.000000e+00>", file: !1, line: 26, size: 8, flags: DIFlagTypePassByValue, elements: !2, templateParams: !19, identifier: "_ZTS3fooIcLi3ELf3f800000ELd4000000000000000EE") |
| 101 | +!19 = !{!20, !22, !29, !30} |
87 | 102 | !20 = !DITemplateTypeParameter(name: "T", type: !21, defaulted: true)
|
88 | 103 | !21 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
|
89 | 104 | !22 = !DITemplateValueParameter(name: "i", type: !10, defaulted: true, value: i32 3)
|
90 | 105 | !23 = !DILocation(line: 31, column: 9, scope: !7)
|
91 | 106 | !24 = !DILocation(line: 32, column: 3, scope: !7)
|
| 107 | +!25 = !DITemplateValueParameter(name: "f", type: !26, value: float 0x3FFE666660000000) |
| 108 | +!26 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) |
| 109 | +!27 = !DITemplateValueParameter(name: "d", type: !28, value: double 1.900000e+00) |
| 110 | +!28 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float) |
| 111 | +!29 = !DITemplateValueParameter(name: "f", type: !26, defaulted: true, value: float 1.000000e+00) |
| 112 | +!30 = !DITemplateValueParameter(name: "d", type: !28, defaulted: true, value: double 2.000000e+00) |
0 commit comments