diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-28 02:26:45 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-28 02:26:45 +0000 |
commit | ce2b983425bb470bd5bf80a17ebc5d6c429c7332 (patch) | |
tree | 3c8a1b35447312735505020004bb8c57201f3058 /llvm/test/DebugInfo/template-recursive-void.ll | |
parent | 50b0956754ea437b8b4df3a53a1950ab9f987a0d (diff) | |
download | bcm5719-llvm-ce2b983425bb470bd5bf80a17ebc5d6c429c7332.tar.gz bcm5719-llvm-ce2b983425bb470bd5bf80a17ebc5d6c429c7332.zip |
DebugInfo: Fix testcases with invalid MDSubprogram nodes
Fix testcases that don't pass the verifier after a WIP patch to check
`MDSubprogram` operands more effectively. I found the following issues:
- When `isDefinition: false`, the `variables:` field might point at
`!{i32 786468}`, or at a tuple that pointed at an empty tuple with
the comment "previously: invalid DW_TAG_base_type" (I vaguely recall
adding those comments during an upgrade script). In these cases, I
just dropped the array.
- The `variables:` field might point at something like `!{!{!8}}`,
where `!8` was an `MDLocation`. I removed the extra layer of
indirection.
- Invalid `type:` (not an `MDSubroutineType`).
llvm-svn: 233466
Diffstat (limited to 'llvm/test/DebugInfo/template-recursive-void.ll')
-rw-r--r-- | llvm/test/DebugInfo/template-recursive-void.ll | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/test/DebugInfo/template-recursive-void.ll b/llvm/test/DebugInfo/template-recursive-void.ll index d6b3b8d0e02..d33b8daab73 100644 --- a/llvm/test/DebugInfo/template-recursive-void.ll +++ b/llvm/test/DebugInfo/template-recursive-void.ll @@ -39,27 +39,23 @@ !11 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !9, baseType: !12) !12 = !MDCompositeType(tag: DW_TAG_class_type, name: "base", line: 3, size: 8, align: 8, file: !1, elements: !13) !13 = !{!14} -!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, variables: !18) +!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) !15 = !MDSubroutineType(types: !16) !16 = !{null, !17} !17 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12) -!18 = !{i32 786468} -!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, variables: !24) +!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) !20 = !MDSubroutineType(types: !21) !21 = !{null, !22, !23} !22 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !9) !23 = !MDDerivedType(tag: DW_TAG_const_type, baseType: !9) -!24 = !{i32 786468} -!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, variables: !28) +!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) !26 = !MDSubroutineType(types: !27) !27 = !{null, !22} -!28 = !{i32 786468} !29 = !{!30} !30 = !MDTemplateTypeParameter(name: "T", type: null) -!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, variables: !35) +!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) !32 = !MDSubroutineType(types: !33) !33 = !{null, !34} !34 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !6) -!35 = !{i32 786468} !36 = !{i32 2, !"Dwarf Version", i32 3} !37 = !{i32 1, !"Debug Info Version", i32 3} |