DebugInfo: Fix invalid file reference in CodeGen/X86/unknown-location.ll
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Feb 2015 23:52:24 +0000 (23:52 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Feb 2015 23:52:24 +0000 (23:52 +0000)
commitaee20c05e6c0fd63c921d1d0681dd4a5de6569cf
tree67fa8ae5a29be1799f5c54ea0947767c0711355b
parentb3381acab26b228bd170452ce26d346f24f404a3
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230880 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/unknown-location.ll