DebugInfo: New metadata representation for global variables.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 13 Sep 2016 01:12:59 +0000 (01:12 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 13 Sep 2016 01:12:59 +0000 (01:12 +0000)
commitd4135bbc30de3d3dbd44d64d718fb2169f41bae0
tree0b96e34c50822aed89a2272d9e9f3688bc3a0e46
parentefc066758309683482edd289d82ec7670d38931f
DebugInfo: New metadata representation for global variables.

This patch reverses the edge from DIGlobalVariable to GlobalVariable.
This will allow us to more easily preserve debug info metadata when
manipulating global variables.

Fixes PR30362. A program for upgrading test cases is attached to that
bug.

Differential Revision: http://reviews.llvm.org/D20147

llvm-svn: 281284
159 files changed:
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/include/llvm/IR/GlobalVariable.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
llvm/lib/CodeGen/GlobalMerge.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Metadata.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Transforms/IPO/StripSymbols.cpp
llvm/test/Assembler/diglobalvariable.ll
llvm/test/Bitcode/diglobalvariable-3.8.ll [new file with mode: 0644]
llvm/test/Bitcode/diglobalvariable-3.8.ll.bc [new file with mode: 0644]
llvm/test/Bitcode/dityperefs-3.8.ll
llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll
llvm/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll
llvm/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll
llvm/test/CodeGen/ARM/coalesce-dbgvalue.ll
llvm/test/CodeGen/NVPTX/generic-to-nvvm-ir.ll
llvm/test/CodeGen/PowerPC/pr17168.ll
llvm/test/CodeGen/PowerPC/pr24546.ll
llvm/test/CodeGen/X86/fpstack-debuginstr-kill.ll
llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll
llvm/test/DebugInfo/AArch64/big-endian.ll
llvm/test/DebugInfo/AArch64/bitfields.ll
llvm/test/DebugInfo/AArch64/frameindices.ll
llvm/test/DebugInfo/ARM/big-endian-bitfield.ll
llvm/test/DebugInfo/ARM/bitfield.ll
llvm/test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll
llvm/test/DebugInfo/ARM/tls.ll
llvm/test/DebugInfo/COFF/anonymous-struct.ll
llvm/test/DebugInfo/COFF/big-type.ll
llvm/test/DebugInfo/COFF/bitfields.ll
llvm/test/DebugInfo/COFF/enum.ll
llvm/test/DebugInfo/COFF/global-dllimport.ll
llvm/test/DebugInfo/COFF/globals-discarded.ll
llvm/test/DebugInfo/COFF/globals.ll
llvm/test/DebugInfo/COFF/inheritance.ll
llvm/test/DebugInfo/COFF/inlining-files.ll
llvm/test/DebugInfo/COFF/inlining-header.ll
llvm/test/DebugInfo/COFF/inlining-levels.ll
llvm/test/DebugInfo/COFF/register-variables.ll
llvm/test/DebugInfo/COFF/scopes.ll
llvm/test/DebugInfo/COFF/types-array-advanced.ll
llvm/test/DebugInfo/COFF/types-nested-class.ll
llvm/test/DebugInfo/COFF/types-ptr-to-member.ll
llvm/test/DebugInfo/COFF/udts.ll
llvm/test/DebugInfo/COFF/virtual-method-kinds.ll
llvm/test/DebugInfo/COFF/vtable-optzn-array.ll
llvm/test/DebugInfo/Generic/2009-11-06-NamelessGlobalVariable.ll
llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll
llvm/test/DebugInfo/Generic/dbg-at-specficiation.ll
llvm/test/DebugInfo/Generic/debuginfofinder-forward-declaration.ll
llvm/test/DebugInfo/Generic/dwarf-public-names.ll
llvm/test/DebugInfo/Generic/enum.ll
llvm/test/DebugInfo/Generic/gvn.ll
llvm/test/DebugInfo/Generic/member-pointers.ll
llvm/test/DebugInfo/Generic/namespace.ll
llvm/test/DebugInfo/Generic/recursive_inlining.ll
llvm/test/DebugInfo/Generic/template-recursive-void.ll
llvm/test/DebugInfo/Generic/tu-member-pointer.ll
llvm/test/DebugInfo/Generic/typedef.ll
llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
llvm/test/DebugInfo/Mips/InlinedFnLocalVar.ll
llvm/test/DebugInfo/PowerPC/tls-fission.ll
llvm/test/DebugInfo/PowerPC/tls.ll
llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
llvm/test/DebugInfo/X86/DIModuleContext.ll
llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll
llvm/test/DebugInfo/X86/DW_AT_specification.ll
llvm/test/DebugInfo/X86/DW_TAG_friend.ll
llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll
llvm/test/DebugInfo/X86/PR26148.ll
llvm/test/DebugInfo/X86/arange-and-stub.ll
llvm/test/DebugInfo/X86/arange.ll
llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
llvm/test/DebugInfo/X86/bitfields.ll
llvm/test/DebugInfo/X86/c-type-units.ll
llvm/test/DebugInfo/X86/concrete_out_of_line.ll
llvm/test/DebugInfo/X86/cu-ranges-odr.ll
llvm/test/DebugInfo/X86/data_member_location.ll
llvm/test/DebugInfo/X86/dbg-subrange.ll
llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
llvm/test/DebugInfo/X86/debug-info-access.ll
llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
llvm/test/DebugInfo/X86/debug-info-static-member.ll
llvm/test/DebugInfo/X86/debug-loc-frame.ll
llvm/test/DebugInfo/X86/debugger-tune.ll
llvm/test/DebugInfo/X86/decl-derived-member.ll
llvm/test/DebugInfo/X86/dllimport.ll
llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
llvm/test/DebugInfo/X86/dwarf-aranges.ll
llvm/test/DebugInfo/X86/dwarf-linkage-names.ll
llvm/test/DebugInfo/X86/dwarf-public-names.ll
llvm/test/DebugInfo/X86/empty-array.ll
llvm/test/DebugInfo/X86/enum-class.ll
llvm/test/DebugInfo/X86/enum-fwd-decl.ll
llvm/test/DebugInfo/X86/externaltyperef.ll
llvm/test/DebugInfo/X86/fission-cu.ll
llvm/test/DebugInfo/X86/generate-odr-hash.ll
llvm/test/DebugInfo/X86/gnu-public-names.ll
llvm/test/DebugInfo/X86/inline-member-function.ll
llvm/test/DebugInfo/X86/inlined-indirect-value.ll
llvm/test/DebugInfo/X86/isel-cse-line.ll
llvm/test/DebugInfo/X86/linkage-name.ll
llvm/test/DebugInfo/X86/live-debug-values.ll
llvm/test/DebugInfo/X86/memberfnptr.ll
llvm/test/DebugInfo/X86/misched-dbg-value.ll
llvm/test/DebugInfo/X86/multiple-aranges.ll
llvm/test/DebugInfo/X86/multiple-at-const-val.ll
llvm/test/DebugInfo/X86/nondefault-subrange-array.ll
llvm/test/DebugInfo/X86/objc-fwd-decl.ll
llvm/test/DebugInfo/X86/pointer-type-size.ll
llvm/test/DebugInfo/X86/pr12831.ll
llvm/test/DebugInfo/X86/ref_addr_relocation.ll
llvm/test/DebugInfo/X86/stack-value-dwarf4.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/stringpool.ll
llvm/test/DebugInfo/X86/struct-loc.ll
llvm/test/DebugInfo/X86/template.ll
llvm/test/DebugInfo/X86/tls.ll
llvm/test/DebugInfo/X86/type_units_with_addresses.ll
llvm/test/DebugInfo/X86/unattached-global.ll [new file with mode: 0644]
llvm/test/DebugInfo/X86/union-template.ll
llvm/test/DebugInfo/X86/vector.ll
llvm/test/Linker/2011-08-04-Metadata.ll
llvm/test/Linker/2011-08-04-Metadata2.ll
llvm/test/Linker/odr.ll
llvm/test/Linker/only-needed-debug-metadata.ll
llvm/test/ThinLTO/X86/Inputs/crash_debuginfo.ll
llvm/test/ThinLTO/X86/Inputs/drop-debug-info.ll
llvm/test/ThinLTO/X86/crash_debuginfo.ll
llvm/test/Transforms/GCOVProfiling/return-block.ll
llvm/test/Transforms/GlobalMerge/debug-info.ll [new file with mode: 0644]
llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll
llvm/test/Transforms/Inline/alloca-dbgdeclare.ll
llvm/test/Transforms/LoopVectorize/dbg.value.ll
llvm/test/Transforms/SampleProfile/cov-zero-samples.ll
llvm/test/Transforms/SimplifyCFG/PR27615-simplify-cond-br.ll
llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll
llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll
llvm/test/tools/llvm-objdump/Hexagon/source-interleave-hexagon.ll
llvm/test/tools/llvm-objdump/X86/source-interleave-x86_64.ll
llvm/unittests/IR/MetadataTest.cpp
llvm/unittests/IR/VerifierTest.cpp