DebugInfo: Fix testcases with invalid MDSubprogram nodes
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Mar 2015 02:26:45 +0000 (02:26 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Mar 2015 02:26:45 +0000 (02:26 +0000)
commitd397a5230517fd7bf44c9893261a3cd4944a77f7
treea9f4d604a5b1770c28a8545e74a8b85010ecedb1
parent44c1c890e459459fdd039f3e9c200ce35d1ebc54
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`).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233466 91177308-0d34-0410-b5e6-96231b3b80d8
33 files changed:
test/Assembler/mdsubprogram.ll
test/CodeGen/X86/stack-protector-dbginfo.ll
test/DebugInfo/2009-11-03-InsertExtractValue.ll
test/DebugInfo/X86/DW_AT_linkage_name.ll
test/DebugInfo/X86/DW_AT_object_pointer.ll
test/DebugInfo/X86/DW_TAG_friend.ll
test/DebugInfo/X86/arguments.ll
test/DebugInfo/X86/concrete_out_of_line.ll
test/DebugInfo/X86/cu-ranges-odr.ll
test/DebugInfo/X86/dbg_value_direct.ll
test/DebugInfo/X86/elf-names.ll
test/DebugInfo/X86/empty-array.ll
test/DebugInfo/X86/generate-odr-hash.ll
test/DebugInfo/X86/inline-member-function.ll
test/DebugInfo/X86/nondefault-subrange-array.ll
test/DebugInfo/X86/parameters.ll
test/DebugInfo/X86/pr11300.ll
test/DebugInfo/X86/pr12831.ll
test/DebugInfo/X86/reference-argument.ll
test/DebugInfo/X86/sroasplit-2.ll
test/DebugInfo/X86/union-template.ll
test/DebugInfo/debug-info-qualifiers.ll
test/DebugInfo/member-order.ll
test/DebugInfo/template-recursive-void.ll
test/DebugInfo/tu-composite.ll
test/DebugInfo/varargs.ll
test/Linker/DbgDeclare.ll
test/Linker/DbgDeclare2.ll
test/Linker/type-unique-odr-a.ll
test/Linker/type-unique-odr-b.ll
test/Linker/type-unique-simple2-a.ll
test/Linker/type-unique-simple2-b.ll
test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll