summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCCodeView.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-05-31 20:55:31 +0000
committerReid Kleckner <rnk@google.com>2019-05-31 20:55:31 +0000
commite98cf5fe47f2585363588d7cdd19c5bfe57f2c13 (patch)
tree8144f68a9ffe0401481cbe0b5c6258fa41edf422 /llvm/lib/MC/MCCodeView.cpp
parent7bafae55c01dda8478aeff74a8d657a4148630af (diff)
downloadbcm5719-llvm-e98cf5fe47f2585363588d7cdd19c5bfe57f2c13.tar.gz
bcm5719-llvm-e98cf5fe47f2585363588d7cdd19c5bfe57f2c13.zip
[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. llvm-svn: 362264
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r--llvm/lib/MC/MCCodeView.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp
index 1a71b542bd0..b2983c11e34 100644
--- a/llvm/lib/MC/MCCodeView.cpp
+++ b/llvm/lib/MC/MCCodeView.cpp
@@ -535,7 +535,6 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout,
unsigned Length = computeLabelDiff(Layout, LastLabel, Loc.getLabel());
compressAnnotation(BinaryAnnotationsOpCode::ChangeCodeLength, Buffer);
compressAnnotation(Length, Buffer);
- LastLabel = Loc.getLabel();
}
HaveOpenRange = false;
continue;
OpenPOWER on IntegriCloud