From 02f4bbc58880c5238fb031928977cac546270710 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 28 Feb 2015 23:52:24 +0000 Subject: [PATCH] DebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll There are two types of files in the old (current) debug info schema. !0 = !{!"some/filename", !"/path/to/dir"} !1 = !{!"0x29", !0} ; [ DW_TAG_file_type ] !1 has a wrapper class called `DIFile` which inherits from `DIScope` and is referenced in 'scope' fields. !0 is called a "file node", and debug info nodes with a 'file' field point at one of these directly -- although they're built in `DIBuilder` by sending in a `DIFile` and reaching into it. In the new hierarchy, I unified these nodes as `MDFile` (which `DIFile` is a lightweight wrapper for) in r230057. Moving the new hierarchy into place (and upgrading testcases) caused CodeGen/X86/unknown-location.ll to start failing -- apparently "0x29" was previously showing up in the linetable as a filename, causing: .loc 2 4 3 (where 2 points at filename "0x29") instead of: .loc 1 4 3 (where 1 points at the actual filename). Change the testcase to use the old schema correctly. llvm-svn: 230880 --- llvm/test/CodeGen/X86/unknown-location.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/test/CodeGen/X86/unknown-location.ll b/llvm/test/CodeGen/X86/unknown-location.ll index 140121b..f20fd9e 100644 --- a/llvm/test/CodeGen/X86/unknown-location.ll +++ b/llvm/test/CodeGen/X86/unknown-location.ll @@ -8,7 +8,7 @@ ; CHECK-NEXT: .loc 1 0 0 ; CHECK: cltd ; CHECK-NEXT: idivl -; CHECK-NEXT: .loc 2 4 3 +; CHECK-NEXT: .loc 1 4 3 define i32 @foo(i32 %w, i32 %x, i32 %y, i32 %z) nounwind { entry: @@ -28,7 +28,7 @@ entry: !4 = !{!"0x15\00\000\000\000\000\000\000", !10, !2, null, !5, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] !5 = !{!6} !6 = !{!"0x24\00int\000\0032\0032\000\000\005", !10, !2} ; [ DW_TAG_base_type ] -!7 = !{!"0xb\001\0030\000", !2, !1} ; [ DW_TAG_lexical_block ] +!7 = !{!"0xb\001\0030\000", !10, !1} ; [ DW_TAG_lexical_block ] !8 = !MDLocation(line: 4, column: 3, scope: !7) !9 = !{!1} !10 = !{!"test.c", !"/dir"} -- 2.7.4