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
diff --git a/llvm/test/DebugInfo/inheritance.ll b/llvm/test/DebugInfo/inheritance.ll
index 0a2261a..ab71d25 100644
--- a/llvm/test/DebugInfo/inheritance.ll
+++ b/llvm/test/DebugInfo/inheritance.ll
@@ -126,29 +126,29 @@
 !18 = !{!"0x2e\00~test1\00~test1\00\004\000\000\001\006\000\000\000", i32 0, !8, !19, !8, null, null, null, null} ; [ DW_TAG_subprogram ]
 !19 = !{!"0x15\00\000\000\000\000\000\000", !4, null, null, !20, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
 !20 = !{null, !17, !7}
-!21 = !{i32 11, i32 0, !1, null}
-!22 = !{i32 13, i32 0, !1, null}
-!23 = !{i32 14, i32 0, !1, null}
+!21 = !MDLocation(line: 11, scope: !1)
+!22 = !MDLocation(line: 13, scope: !1)
+!23 = !MDLocation(line: 14, scope: !1)
 !24 = !{!"0x101\00this\0013\000", !25, !4, !26} ; [ DW_TAG_arg_variable ]
 !25 = !{!"0x2e\00test1\00test1\00_ZN5test1C1Ev\001\000\001\000\006\000\000\000", i32 0, !4, !15, null, null, null, null, null} ; [ DW_TAG_subprogram ]
 !26 = !{!"0x26\00\000\0064\0064\000\0064", !4, null, !27} ; [ DW_TAG_const_type ]
 !27 = !{!"0xf\00\000\0064\0064\000\000", !4, null, !8} ; [ DW_TAG_pointer_type ]
-!28 = !{i32 1, i32 0, !25, null}
-!29 = !{i32 1, i32 0, !30, null}
+!28 = !MDLocation(line: 1, scope: !25)
+!29 = !MDLocation(line: 1, scope: !30)
 !30 = !{!"0xb\000\000\000", !44, !31} ; [ DW_TAG_lexical_block ]
 !31 = !{!"0xb\000\000\000", !44, !25} ; [ DW_TAG_lexical_block ]
 !32 = !{!"0x101\00this\004\000", !33, !4, !26} ; [ DW_TAG_arg_variable ]
 !33 = !{!"0x2e\00~test1\00~test1\00_ZN5test1D1Ev\004\000\001\001\006\000\000\000", i32 0, !8, !15, !8, null, null, null, null} ; [ DW_TAG_subprogram ]
-!34 = !{i32 4, i32 0, !33, null}
-!35 = !{i32 5, i32 0, !36, null}
+!34 = !MDLocation(line: 4, scope: !33)
+!35 = !MDLocation(line: 5, scope: !36)
 !36 = !{!"0xb\000\000\000", !44, !33} ; [ DW_TAG_lexical_block ]
-!37 = !{i32 6, i32 0, !36, null}
+!37 = !MDLocation(line: 6, scope: !36)
 !38 = !{!"0x101\00this\004\000", !39, !4, !26} ; [ DW_TAG_arg_variable ]
 !39 = !{!"0x2e\00~test1\00~test1\00_ZN5test1D0Ev\004\000\001\001\006\000\000\000", i32 0, !8, !15, !8, null, null, null, null} ; [ DW_TAG_subprogram ]
-!40 = !{i32 4, i32 0, !39, null}
-!41 = !{i32 5, i32 0, !42, null}
+!40 = !MDLocation(line: 4, scope: !39)
+!41 = !MDLocation(line: 5, scope: !42)
 !42 = !{!"0xb\000\000\000", !44, !39} ; [ DW_TAG_lexical_block ]
-!43 = !{i32 6, i32 0, !42, null}
+!43 = !MDLocation(line: 6, scope: !42)
 !44 = !{!"inheritance.cpp", !"/tmp/"}
 !45 = !{i32 0}
 !46 = !{!"<built-in>", !"/tmp/"}