Eric Christopher | 056b647 | 2013-08-08 08:09:43 +0000 | [diff] [blame] | 1 | ; REQUIRES: object-emission |
| 2 | |
Timur Iskhodzhanov | f166f6c | 2014-01-30 01:39:17 +0000 | [diff] [blame] | 3 | ; RUN: %llc_dwarf -O0 -filetype=obj < %s > %t |
Eric Christopher | 056b647 | 2013-08-08 08:09:43 +0000 | [diff] [blame] | 4 | ; RUN: llvm-dwarfdump %t | FileCheck %s |
| 5 | |
Eric Christopher | d6e8f83 | 2013-08-12 23:59:26 +0000 | [diff] [blame] | 6 | ; 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 Ren | f6b936b | 2013-10-29 05:49:41 +0000 | [diff] [blame] | 16 | ; CHECK: DW_TAG_template_type_parameter [{{.*}}] |
Eric Christopher | 056b647 | 2013-08-08 08:09:43 +0000 | [diff] [blame] | 17 | ; 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 Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 26 | !llvm.module.flags = !{!36, !37} |
Eric Christopher | 056b647 | 2013-08-08 08:09:43 +0000 | [diff] [blame] | 27 | |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 28 | !0 = !DICompileUnit(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 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 30 | !2 = !{} |
| 31 | !3 = !{!4} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 32 | !4 = !DIGlobalVariable(name: "filters", line: 10, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: %class.bar* @filters) |
| 33 | !5 = !DIFile(filename: "debug-info-template-recursive.cpp", directory: "/usr/local/google/home/echristo/tmp") |
| 34 | !6 = !DICompositeType(tag: DW_TAG_class_type, name: "bar", line: 9, size: 8, align: 8, file: !1, elements: !7) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 35 | !7 = !{!8, !31} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 36 | !8 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !6, baseType: !9) |
| 37 | !9 = !DICompositeType(tag: DW_TAG_class_type, name: "foo<void>", line: 5, size: 8, align: 8, file: !1, elements: !10, templateParams: !29) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 38 | !10 = !{!11, !19, !25} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 39 | !11 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !9, baseType: !12) |
| 40 | !12 = !DICompositeType(tag: DW_TAG_class_type, name: "base", line: 3, size: 8, align: 8, file: !1, elements: !13) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 41 | !13 = !{!14} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 42 | !14 = !DISubprogram(name: "base", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !12, type: !15) |
| 43 | !15 = !DISubroutineType(types: !16) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 44 | !16 = !{null, !17} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 45 | !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12) |
| 46 | !19 = !DISubprogram(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) |
| 47 | !20 = !DISubroutineType(types: !21) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 48 | !21 = !{null, !22, !23} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 49 | !22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) |
| 50 | !23 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9) |
| 51 | !25 = !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !9, type: !26) |
| 52 | !26 = !DISubroutineType(types: !27) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 53 | !27 = !{null, !22} |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 54 | !29 = !{!30} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 55 | !30 = !DITemplateTypeParameter(name: "T", type: null) |
| 56 | !31 = !DISubprogram(name: "bar", line: 9, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !1, scope: !6, type: !32) |
| 57 | !32 = !DISubroutineType(types: !33) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 58 | !33 = !{null, !34} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame^] | 59 | !34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !6) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 60 | !36 = !{i32 2, !"Dwarf Version", i32 3} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 61 | !37 = !{i32 1, !"Debug Info Version", i32 3} |