IR: Move MDLocation into place
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 14 Jan 2015 22:27:36 +0000 (22:27 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 14 Jan 2015 22:27:36 +0000 (22:27 +0000)
commit9885469922266d43622af58871253fadfef42d48
treefc06d29b0e8d1b751e25e109086ba0fcfc1ef842
parent96a319588a752c0254f8b214c2454a95855bcac4
IR: Move MDLocation into place

This commit moves `MDLocation`, finishing off PR21433.  There's an
accompanying clang commit for frontend testcases.  I'll attach the
testcase upgrade script I used to PR21433 to help out-of-tree
frontends/backends.

This changes the schema for `DebugLoc` and `DILocation` from:

    !{i32 3, i32 7, !7, !8}

to:

    !MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8)

Note that empty fields (line/column: 0 and inlinedAt: null) don't get
printed by the assembly writer.

llvm-svn: 226048
299 files changed:
llvm/include/llvm/IR/DebugInfo.h
llvm/lib/IR/DebugInfo.cpp
llvm/lib/IR/DebugLoc.cpp
llvm/test/Assembler/functionlocal-metadata.ll
llvm/test/Assembler/metadata.ll
llvm/test/Bindings/OCaml/core.ml
llvm/test/Bitcode/drop-debug-info.ll
llvm/test/BugPoint/metadata.ll
llvm/test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll
llvm/test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll
llvm/test/CodeGen/ARM/2009-10-16-Scope.ll
llvm/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll
llvm/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll
llvm/test/CodeGen/ARM/2010-08-04-StackVariable.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/ARM/debug-frame-vararg.ll
llvm/test/CodeGen/ARM/debug-frame.ll
llvm/test/CodeGen/ARM/debug-info-arg.ll
llvm/test/CodeGen/ARM/debug-info-blocks.ll
llvm/test/CodeGen/ARM/debug-info-branch-folding.ll
llvm/test/CodeGen/ARM/debug-info-d16-reg.ll
llvm/test/CodeGen/ARM/debug-info-qreg.ll
llvm/test/CodeGen/ARM/debug-info-s16-reg.ll
llvm/test/CodeGen/ARM/debug-info-sreg2.ll
llvm/test/CodeGen/ARM/debug-segmented-stacks.ll
llvm/test/CodeGen/Hexagon/hwloop-dbg.ll
llvm/test/CodeGen/Inputs/DbgValueOtherTargets.ll
llvm/test/CodeGen/PowerPC/dbg.ll
llvm/test/CodeGen/PowerPC/pr17168.ll
llvm/test/CodeGen/PowerPC/unwind-dw2-g.ll
llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
llvm/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll
llvm/test/CodeGen/X86/2009-10-16-Scope.ll
llvm/test/CodeGen/X86/2010-01-18-DbgValue.ll
llvm/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll
llvm/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll
llvm/test/CodeGen/X86/2010-05-28-Crash.ll
llvm/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll
llvm/test/CodeGen/X86/2010-07-06-DbgCrash.ll
llvm/test/CodeGen/X86/2010-08-04-StackVariable.ll
llvm/test/CodeGen/X86/2010-09-16-EmptyFilename.ll
llvm/test/CodeGen/X86/2010-11-02-DbgParameter.ll
llvm/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll
llvm/test/CodeGen/X86/MachineSink-DbgValue.ll
llvm/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll
llvm/test/CodeGen/X86/misched-code-difference-with-debug.ll
llvm/test/CodeGen/X86/stack-protector-dbginfo.ll
llvm/test/CodeGen/X86/unknown-location.ll
llvm/test/CodeGen/XCore/dwarf_debug.ll
llvm/test/DebugInfo/2009-11-05-DeadGlobalVariable.ll
llvm/test/DebugInfo/2009-11-10-CurrentFn.ll
llvm/test/DebugInfo/2010-01-05-DbgScope.ll
llvm/test/DebugInfo/2010-03-19-DbgDeclare.ll
llvm/test/DebugInfo/2010-03-24-MemberFn.ll
llvm/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll
llvm/test/DebugInfo/2010-04-19-FramePtr.ll
llvm/test/DebugInfo/2010-05-03-DisableFramePtr.ll
llvm/test/DebugInfo/2010-05-03-OriginDIE.ll
llvm/test/DebugInfo/2010-05-10-MultipleCU.ll
llvm/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll
llvm/test/DebugInfo/2010-07-19-Crash.ll
llvm/test/DebugInfo/2010-10-01-crash.ll
llvm/test/DebugInfo/AArch64/cfi-eof-prologue.ll
llvm/test/DebugInfo/AArch64/coalescing.ll
llvm/test/DebugInfo/AArch64/dwarfdump.ll
llvm/test/DebugInfo/AArch64/struct_by_value.ll
llvm/test/DebugInfo/ARM/PR16736.ll
llvm/test/DebugInfo/ARM/cfi-eof-prologue.ll
llvm/test/DebugInfo/ARM/lowerbdgdeclare_vla.ll
llvm/test/DebugInfo/ARM/s-super-register.ll
llvm/test/DebugInfo/COFF/asan-module-ctor.ll
llvm/test/DebugInfo/COFF/asm.ll
llvm/test/DebugInfo/COFF/cpp-mangling.ll
llvm/test/DebugInfo/COFF/multifile.ll
llvm/test/DebugInfo/COFF/multifunction.ll
llvm/test/DebugInfo/COFF/simple.ll
llvm/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll
llvm/test/DebugInfo/Inputs/gmlt.ll
llvm/test/DebugInfo/Mips/delay-slot.ll
llvm/test/DebugInfo/PR20038.ll
llvm/test/DebugInfo/Sparc/gnu-window-save.ll
llvm/test/DebugInfo/SystemZ/variable-loc.ll
llvm/test/DebugInfo/X86/2010-04-13-PubType.ll
llvm/test/DebugInfo/X86/2010-08-10-DbgConstant.ll
llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
llvm/test/DebugInfo/X86/2011-12-16-BadStructRef.ll
llvm/test/DebugInfo/X86/DW_AT_byte_size.ll
llvm/test/DebugInfo/X86/DW_AT_linkage_name.ll
llvm/test/DebugInfo/X86/DW_AT_location-reference.ll
llvm/test/DebugInfo/X86/DW_AT_object_pointer.ll
llvm/test/DebugInfo/X86/DW_AT_specification.ll
llvm/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll
llvm/test/DebugInfo/X86/aligned_stack_var.ll
llvm/test/DebugInfo/X86/arguments.ll
llvm/test/DebugInfo/X86/array.ll
llvm/test/DebugInfo/X86/array2.ll
llvm/test/DebugInfo/X86/block-capture.ll
llvm/test/DebugInfo/X86/byvalstruct.ll
llvm/test/DebugInfo/X86/coff_debug_info_type.ll
llvm/test/DebugInfo/X86/coff_relative_names.ll
llvm/test/DebugInfo/X86/concrete_out_of_line.ll
llvm/test/DebugInfo/X86/constant-aggregate.ll
llvm/test/DebugInfo/X86/cu-ranges-odr.ll
llvm/test/DebugInfo/X86/cu-ranges.ll
llvm/test/DebugInfo/X86/dbg-byval-parameter.ll
llvm/test/DebugInfo/X86/dbg-const-int.ll
llvm/test/DebugInfo/X86/dbg-const.ll
llvm/test/DebugInfo/X86/dbg-declare-arg.ll
llvm/test/DebugInfo/X86/dbg-declare.ll
llvm/test/DebugInfo/X86/dbg-i128-const.ll
llvm/test/DebugInfo/X86/dbg-merge-loc-entry.ll
llvm/test/DebugInfo/X86/dbg-prolog-end.ll
llvm/test/DebugInfo/X86/dbg-subrange.ll
llvm/test/DebugInfo/X86/dbg-value-const-byref.ll
llvm/test/DebugInfo/X86/dbg-value-dag-combine.ll
llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
llvm/test/DebugInfo/X86/dbg-value-isel.ll
llvm/test/DebugInfo/X86/dbg-value-location.ll
llvm/test/DebugInfo/X86/dbg-value-range.ll
llvm/test/DebugInfo/X86/dbg-value-terminator.ll
llvm/test/DebugInfo/X86/dbg_value_direct.ll
llvm/test/DebugInfo/X86/debug-dead-local-var.ll
llvm/test/DebugInfo/X86/debug-info-access.ll
llvm/test/DebugInfo/X86/debug-info-block-captured-self.ll
llvm/test/DebugInfo/X86/debug-info-blocks.ll
llvm/test/DebugInfo/X86/debug-info-static-member.ll
llvm/test/DebugInfo/X86/debug-loc-asan.ll
llvm/test/DebugInfo/X86/debug-loc-offset.ll
llvm/test/DebugInfo/X86/debug-ranges-offset.ll
llvm/test/DebugInfo/X86/decl-derived-member.ll
llvm/test/DebugInfo/X86/discriminator.ll
llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
llvm/test/DebugInfo/X86/dwarf-aranges.ll
llvm/test/DebugInfo/X86/dwarf-public-names.ll
llvm/test/DebugInfo/X86/dwarf-pubnames-split.ll
llvm/test/DebugInfo/X86/elf-names.ll
llvm/test/DebugInfo/X86/empty-and-one-elem-array.ll
llvm/test/DebugInfo/X86/ending-run.ll
llvm/test/DebugInfo/X86/fission-inline.ll
llvm/test/DebugInfo/X86/fission-ranges.ll
llvm/test/DebugInfo/X86/formal_parameter.ll
llvm/test/DebugInfo/X86/generate-odr-hash.ll
llvm/test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll
llvm/test/DebugInfo/X86/gnu-public-names.ll
llvm/test/DebugInfo/X86/inline-member-function.ll
llvm/test/DebugInfo/X86/inline-seldag-test.ll
llvm/test/DebugInfo/X86/instcombine-instrinsics.ll
llvm/test/DebugInfo/X86/lexical_block.ll
llvm/test/DebugInfo/X86/line-info.ll
llvm/test/DebugInfo/X86/linkage-name.ll
llvm/test/DebugInfo/X86/low-pc-cu.ll
llvm/test/DebugInfo/X86/misched-dbg-value.ll
llvm/test/DebugInfo/X86/nodebug_with_debug_loc.ll
llvm/test/DebugInfo/X86/objc-property-void.ll
llvm/test/DebugInfo/X86/op_deref.ll
llvm/test/DebugInfo/X86/parameters.ll
llvm/test/DebugInfo/X86/pieces-1.ll
llvm/test/DebugInfo/X86/pieces-2.ll
llvm/test/DebugInfo/X86/pieces-3.ll
llvm/test/DebugInfo/X86/pr11300.ll
llvm/test/DebugInfo/X86/pr12831.ll
llvm/test/DebugInfo/X86/pr13303.ll
llvm/test/DebugInfo/X86/pr19307.ll
llvm/test/DebugInfo/X86/prologue-stack.ll
llvm/test/DebugInfo/X86/recursive_inlining.ll
llvm/test/DebugInfo/X86/reference-argument.ll
llvm/test/DebugInfo/X86/rvalue-ref.ll
llvm/test/DebugInfo/X86/sret.ll
llvm/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll
llvm/test/DebugInfo/X86/subrange-type.ll
llvm/test/DebugInfo/X86/subreg.ll
llvm/test/DebugInfo/X86/subregisters.ll
llvm/test/DebugInfo/X86/template.ll
llvm/test/DebugInfo/X86/tls.ll
llvm/test/DebugInfo/X86/union-template.ll
llvm/test/DebugInfo/X86/vla.ll
llvm/test/DebugInfo/array.ll
llvm/test/DebugInfo/block-asan.ll
llvm/test/DebugInfo/constant-pointers.ll
llvm/test/DebugInfo/cross-cu-inlining.ll
llvm/test/DebugInfo/cross-cu-linkonce-distinct.ll
llvm/test/DebugInfo/cross-cu-linkonce.ll
llvm/test/DebugInfo/cu-range-hole.ll
llvm/test/DebugInfo/cu-ranges.ll
llvm/test/DebugInfo/dead-argument-order.ll
llvm/test/DebugInfo/debug-info-always-inline.ll
llvm/test/DebugInfo/debug-info-qualifiers.ll
llvm/test/DebugInfo/debuginfofinder-multiple-cu.ll
llvm/test/DebugInfo/duplicate_inline.ll
llvm/test/DebugInfo/dwarf-public-names.ll
llvm/test/DebugInfo/enum-types.ll
llvm/test/DebugInfo/enum.ll
llvm/test/DebugInfo/global.ll
llvm/test/DebugInfo/incorrect-variable-debugloc.ll
llvm/test/DebugInfo/incorrect-variable-debugloc1.ll
llvm/test/DebugInfo/inheritance.ll
llvm/test/DebugInfo/inline-debug-info-multiret.ll
llvm/test/DebugInfo/inline-debug-info.ll
llvm/test/DebugInfo/inline-no-debug-info.ll
llvm/test/DebugInfo/inline-scopes.ll
llvm/test/DebugInfo/inlined-arguments.ll
llvm/test/DebugInfo/inlined-vars.ll
llvm/test/DebugInfo/lto-comp-dir.ll
llvm/test/DebugInfo/member-order.ll
llvm/test/DebugInfo/missing-abstract-variable.ll
llvm/test/DebugInfo/multiline.ll
llvm/test/DebugInfo/namespace.ll
llvm/test/DebugInfo/namespace_function_definition.ll
llvm/test/DebugInfo/namespace_inline_function_definition.ll
llvm/test/DebugInfo/nodebug.ll
llvm/test/DebugInfo/restrict.ll
llvm/test/DebugInfo/sugared-constants.ll
llvm/test/DebugInfo/tu-composite.ll
llvm/test/DebugInfo/two-cus-from-same-file.ll
llvm/test/DebugInfo/unconditional-branch.ll
llvm/test/DebugInfo/varargs.ll
llvm/test/DebugInfo/version.ll
llvm/test/Feature/md_on_instruction.ll
llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
llvm/test/Instrumentation/DataFlowSanitizer/debug.ll
llvm/test/Instrumentation/MemorySanitizer/store-origin.ll
llvm/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
llvm/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
llvm/test/JitListener/multiple.ll
llvm/test/JitListener/simple.ll
llvm/test/Linker/2011-08-04-DebugLoc.ll
llvm/test/Linker/2011-08-04-DebugLoc2.ll
llvm/test/Linker/2011-08-04-Metadata.ll
llvm/test/Linker/2011-08-04-Metadata2.ll
llvm/test/Linker/2011-08-18-unique-class-type.ll
llvm/test/Linker/2011-08-18-unique-class-type2.ll
llvm/test/Linker/2011-08-18-unique-debug-type.ll
llvm/test/Linker/2011-08-18-unique-debug-type2.ll
llvm/test/Linker/DbgDeclare.ll
llvm/test/Linker/DbgDeclare2.ll
llvm/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
llvm/test/Linker/Inputs/type-unique-simple2-a.ll
llvm/test/Linker/Inputs/type-unique-simple2-b.ll
llvm/test/Linker/replaced-function-matches-first-subprogram.ll
llvm/test/Linker/type-unique-odr-a.ll
llvm/test/Linker/type-unique-odr-b.ll
llvm/test/Linker/type-unique-simple-a.ll
llvm/test/Linker/type-unique-simple-b.ll
llvm/test/Linker/type-unique-simple2-a.ll
llvm/test/Linker/type-unique-simple2-b.ll
llvm/test/Linker/type-unique-type-array-a.ll
llvm/test/Linker/type-unique-type-array-b.ll
llvm/test/MC/ARM/coff-debugging-secrel.ll
llvm/test/MC/ELF/cfi-version.ll
llvm/test/Transforms/AddDiscriminators/basic.ll
llvm/test/Transforms/AddDiscriminators/first-only.ll
llvm/test/Transforms/AddDiscriminators/multiple.ll
llvm/test/Transforms/AddDiscriminators/no-discriminators.ll
llvm/test/Transforms/ArgumentPromotion/dbg.ll
llvm/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
llvm/test/Transforms/DeadArgElim/dbginfo.ll
llvm/test/Transforms/GCOVProfiling/function-numbering.ll
llvm/test/Transforms/GCOVProfiling/global-ctor.ll
llvm/test/Transforms/GCOVProfiling/linezero.ll
llvm/test/Transforms/GCOVProfiling/linkagename.ll
llvm/test/Transforms/GCOVProfiling/return-block.ll
llvm/test/Transforms/GCOVProfiling/version.ll
llvm/test/Transforms/GlobalOpt/2009-03-05-dbg.ll
llvm/test/Transforms/Inline/debug-invoke.ll
llvm/test/Transforms/Inline/inline_dbg_declare.ll
llvm/test/Transforms/InstCombine/debug-line.ll
llvm/test/Transforms/InstCombine/debuginfo.ll
llvm/test/Transforms/LICM/debug-value.ll
llvm/test/Transforms/LoopIdiom/debug-line.ll
llvm/test/Transforms/LoopRotate/dbgvalue.ll
llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll
llvm/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll
llvm/test/Transforms/LoopVectorize/conditional-assignment.ll
llvm/test/Transforms/LoopVectorize/control-flow.ll
llvm/test/Transforms/LoopVectorize/dbg.value.ll
llvm/test/Transforms/LoopVectorize/debugloc.ll
llvm/test/Transforms/LoopVectorize/no_array_bounds.ll
llvm/test/Transforms/LoopVectorize/no_switch.ll
llvm/test/Transforms/Mem2Reg/ConvertDebugInfo.ll
llvm/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
llvm/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
llvm/test/Transforms/SLPVectorizer/X86/debug_info.ll
llvm/test/Transforms/SampleProfile/branch.ll
llvm/test/Transforms/SampleProfile/calls.ll
llvm/test/Transforms/SampleProfile/discriminator.ll
llvm/test/Transforms/SampleProfile/fnptr.ll
llvm/test/Transforms/SampleProfile/propagate.ll
llvm/test/Transforms/ScalarRepl/debuginfo-preserved.ll
llvm/test/Transforms/Scalarizer/dbginfo.ll
llvm/test/Transforms/SimplifyCFG/branch-fold-dbg.ll
llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll
llvm/test/Transforms/SimplifyCFG/trap-debugloc.ll
llvm/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll
llvm/test/Transforms/StripSymbols/2010-08-25-crash.ll
llvm/test/Transforms/StripSymbols/strip-dead-debug-info.ll