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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226048 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-14 22:27:36 +00:00
parent de8202b084
commit 37ac8d3622
299 changed files with 1587 additions and 1580 deletions

View File

@@ -31,9 +31,9 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!13 = !{!15, !16}
!15 = !{!"0x101\00argc\0016777217\000", !5, !6, !9} ; [ DW_TAG_arg_variable ]
!16 = !{!"0x101\00argv\0033554433\000", !5, !6, !10} ; [ DW_TAG_arg_variable ]
!17 = !{i32 1, i32 14, !5, null}
!18 = !{i32 1, i32 26, !5, null}
!19 = !{i32 2, i32 3, !20, null}
!17 = !MDLocation(line: 1, column: 14, scope: !5)
!18 = !MDLocation(line: 1, column: 26, scope: !5)
!19 = !MDLocation(line: 2, column: 3, scope: !20)
!20 = !{!"0xb\001\0034\000", !21, !5} ; [ DW_TAG_lexical_block ]
!21 = !{!"dbg.c", !"/src"}
!22 = !{i32 1, !"Debug Info Version", i32 2}

View File

@@ -493,26 +493,26 @@ attributes #1 = { nounwind readnone }
!436 = !{!"0x34\00tmp2\00tmp2\00\0088\001\001", null, !300, !20, null, null} ; [ DW_TAG_variable ] [tmp2] [line 88] [local] [def]
!437 = !{!"0x34\00tmp1\00tmp1\00\0088\001\001", null, !300, !20, null, null} ; [ DW_TAG_variable ] [tmp1] [line 88] [local] [def]
!438 = !{i32 2, !"Dwarf Version", i32 4}
!439 = !{i32 1898, i32 0, !440, null}
!439 = !MDLocation(line: 1898, scope: !440)
!440 = !{!"0xb\001898\000\00107", !1, !114} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!441 = !{i32 1913, i32 0, !442, null}
!441 = !MDLocation(line: 1913, scope: !442)
!442 = !{!"0xb\001913\000\00115", !1, !114} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!443 = !{i32 1923, i32 0, !114, null}
!443 = !MDLocation(line: 1923, scope: !114)
!444 = !{!"int", !445}
!445 = !{!"omnipotent char", !446}
!446 = !{!"Simple C/C++ TBAA"}
!447 = !{i32 1}
!448 = !{i32 1925, i32 0, !449, null}
!448 = !MDLocation(line: 1925, scope: !449)
!449 = !{!"0xb\001925\000\00121", !1, !114} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!450 = !{i32 1939, i32 0, !451, null}
!450 = !MDLocation(line: 1939, scope: !451)
!451 = !{!"0xb\001939\000\00127", !1, !114} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!452 = !{i32 1940, i32 0, !453, null}
!452 = !MDLocation(line: 1940, scope: !453)
!453 = !{!"0xb\001940\000\00129", !1, !454} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!454 = !{!"0xb\001939\000\00128", !1, !451} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!455 = !{i32 1941, i32 0, !456, null}
!455 = !MDLocation(line: 1941, scope: !456)
!456 = !{!"0xb\001941\000\00131", !1, !457} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!457 = !{!"0xb\001940\000\00130", !1, !453} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!458 = !{i32 2020, i32 0, !459, null}
!458 = !MDLocation(line: 2020, scope: !459)
!459 = !{!"0xb\002020\000\00149", !1, !460} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!460 = !{!"0xb\002019\000\00148", !1, !461} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]
!461 = !{!"0xb\002019\000\00147", !1, !462} ; [ DW_TAG_lexical_block ] [/home/hfinkel/src/NPB2.3-omp-C/BT/bt.c]

View File

@@ -30,6 +30,6 @@ attributes #0 = { nounwind }
!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
!7 = !{null}
!8 = !{i32 2, !"Dwarf Version", i32 3}
!9 = !{i32 2, i32 0, !4, null}
!10 = !{i32 3, i32 0, !4, null}
!9 = !MDLocation(line: 2, scope: !4)
!10 = !MDLocation(line: 3, scope: !4)
!11 = !{i32 1, !"Debug Info Version", i32 2}