blob: d33b8daab7370c6cc6c29e36876b754551af3c62 [file] [log] [blame]
Eric Christopher056b6472013-08-08 08:09:43 +00001; REQUIRES: object-emission
2
Timur Iskhodzhanovf166f6c2014-01-30 01:39:17 +00003; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t
Eric Christopher056b6472013-08-08 08:09:43 +00004; RUN: llvm-dwarfdump %t | FileCheck %s
5
Eric Christopherd6e8f832013-08-12 23:59:26 +00006; This was pulled from clang's debug-info-template-recursive.cpp test.
7; class base { };
8
9; template <class T> class foo : public base {
10; void operator=(const foo r) { }
11; };
12
13; class bar : public foo<void> { };
14; bar filters;
15
Manman Renf6b936b2013-10-29 05:49:41 +000016; CHECK: DW_TAG_template_type_parameter [{{.*}}]
Eric Christopher056b6472013-08-08 08:09:43 +000017; CHECK-NEXT: DW_AT_name{{.*}}"T"
18; CHECK-NOT: DW_AT_type
19; CHECK: NULL
20
21%class.bar = type { i8 }
22
23@filters = global %class.bar zeroinitializer, align 1
24
25!llvm.dbg.cu = !{!0}
Manman Ren409558f2013-11-22 21:49:45 +000026!llvm.module.flags = !{!36, !37}
Eric Christopher056b6472013-08-08 08:09:43 +000027
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000028!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 187958) (llvm/trunk 187964)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2)
29!1 = !MDFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000030!2 = !{}
31!3 = !{!4}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000032!4 = !MDGlobalVariable(name: "filters", line: 10, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: %class.bar* @filters)
33!5 = !MDFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp")
34!6 = !MDCompositeType(tag: DW_TAG_class_type, name: "bar", line: 9, size: 8, align: 8, file: !1, elements: !7)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000035!7 = !{!8, !31}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000036!8 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !6, baseType: !9)
37!9 = !MDCompositeType(tag: DW_TAG_class_type, name: "foo<void>", line: 5, size: 8, align: 8, file: !1, elements: !10, templateParams: !29)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000038!10 = !{!11, !19, !25}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000039!11 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !9, baseType: !12)
40!12 = !MDCompositeType(tag: DW_TAG_class_type, name: "base", line: 3, size: 8, align: 8, file: !1, elements: !13)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000041!13 = !{!14}
Duncan P. N. Exon Smithce2b9832015-03-28 02:26:45 +000042!14 = !MDSubprogram(name: "base", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !12, type: !15)
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000043!15 = !MDSubroutineType(types: !16)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000044!16 = !{null, !17}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000045!17 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12)
Duncan P. N. Exon Smithce2b9832015-03-28 02:26:45 +000046!19 = !MDSubprogram(name: "operator=", linkageName: "_ZN3fooIvEaSES0_", line: 6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !9, type: !20)
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000047!20 = !MDSubroutineType(types: !21)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000048!21 = !{null, !22, !23}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000049!22 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9)
50!23 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !9)
Duncan P. N. Exon Smithce2b9832015-03-28 02:26:45 +000051!25 = !MDSubprogram(name: "foo", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !9, type: !26)
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000052!26 = !MDSubroutineType(types: !27)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000053!27 = !{null, !22}
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000054!29 = !{!30}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000055!30 = !MDTemplateTypeParameter(name: "T", type: null)
Duncan P. N. Exon Smithce2b9832015-03-28 02:26:45 +000056!31 = !MDSubprogram(name: "bar", line: 9, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !6, type: !32)
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000057!32 = !MDSubroutineType(types: !33)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000058!33 = !{null, !34}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000059!34 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !6)
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000060!36 = !{i32 2, !"Dwarf Version", i32 3}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000061!37 = !{i32 1, !"Debug Info Version", i32 3}