OSDN Git Service

[codeview] Fix inline line table accuracy for discontiguous segments
authorReid Kleckner <rnk@google.com>
Fri, 31 May 2019 20:55:31 +0000 (20:55 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 31 May 2019 20:55:31 +0000 (20:55 +0000)
commitcabc6f59cc5f144c36a4c473c159eb0ce5cea1e0
tree85ed6014a5d5934ae2be78b6b6c14faf8da54406
parent9361861fe581db6b4ba5bbcabfd155e32e010c90
[codeview] Fix inline line table accuracy for discontiguous segments

After improving the inline line table dumper in llvm-pdbutil and looking
at MSVC's inline line tables, it is clear that setting the length of the
inlined code region does not update the code offset. This means that the
delta to the beginning of a new discontiguous inlined code region should
be calculated relative to the last code offset, excluding the length.
Implementing this is a one line fix for MC: simply don't update
LastLabel.

While I'm updating these test cases, switch them to use llvm-objdump -d
and llvm-pdbutil. This allows us to show offsets of each instruction and
correlate the line table offsets to the actual code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362264 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCCodeView.cpp
test/MC/COFF/cv-inline-linetable-unlikely.s
test/MC/COFF/cv-inline-linetable.s
test/MC/COFF/cv-loc-unreachable-2.s
test/MC/COFF/cv-loc-unreachable.s