61 lines · plain
1; REQUIRES: x86-registered-target2 3; For the given test case:4 5; 1 // Template Template parameters.6; 2 // Simple template class7; 3 template <typename T> class Foo { T Member; };8; 49; 5 // Template template class10; 6 template <template <typename T> class TemplateType>11; 7 class Bar {12; 8 TemplateType<int> Int;13; 9 };14; 1015; 11 template <template <template <typename> class> class TemplateTemplateType>16; 12 class Baz {17; 13 TemplateTemplateType<Foo> Foo;18; 14 };19; 1520; 16 typedef Baz<Bar> Example;21; 1722; 18 Example TT;23 24; The llvm-debuginfo-analyzer did not support the DW_AT_GNU_template_name25; attribute. When using '--attribute=encoded' and the template argument is26; another template, it would show:27; {Encoded} <>28 29; The object file is generated using the following commands:30;31; clang++ -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes32; -fno-discard-value-names -emit-llvm -S -g -O033; DW_AT_GNU_template_name.cpp -o DW_AT_GNU_template_name.ll34; llc --filetype=obj DW_AT_GNU_template_name.ll -o DW_AT_GNU_template_name.o35;36; llvm-debuginfo-analyzer --attribute=encoded --print=symbols37; DW_AT_GNU_template_name.o38 39; RUN: llc --filetype=obj \40; RUN: %p/Inputs/DW_AT_GNU_template_name.ll -o %t.DW_AT_GNU_template_name.o41 42; RUN: llvm-debuginfo-analyzer --attribute=encoded \43; RUN: --print=symbols \44; RUN: %t.DW_AT_GNU_template_name.o 2>&1 | \45; RUN: FileCheck --strict-whitespace %s46 47; CHECK: Logical View:48; CHECK: {File} '{{.*}}dw_at_gnu_template_name.o'49; CHECK-EMPTY:50; CHECK: {CompileUnit} 'dw_at_gnu_template_name.cpp'51; CHECK: 3 {Class} 'Foo<int>'52; CHECK: {Encoded} <int>53; CHECK: 3 {Member} private 'Member' -> 'int'54; CHECK: 7 {Class} 'Bar<Foo>'55; CHECK: {Encoded} <Foo>56; CHECK: 8 {Member} private 'Int' -> 'Foo<int>'57; CHECK: 12 {Class} 'Baz<Bar>'58; CHECK: {Encoded} <Bar>59; CHECK: 13 {Member} private 'Foo' -> 'Bar<Foo>'60; CHECK: 18 {Variable} extern 'TT' -> 'Example'61