diff options
author | Amy Huang <akhuang@google.com> | 2020-12-03 09:03:55 -0800 |
---|---|---|
committer | Amy Huang <akhuang@google.com> | 2020-12-07 13:01:53 -0800 |
commit | 399bc48eccf0d983a8a4644c12ed9cc21ff33f33 (patch) | |
tree | f455a468bdb61f88584c37b159ee89356a5fd077 /llvm/lib/MC/MCCodeView.cpp | |
parent | b570f82f43a74fc842b9fd7f03bf0eca18fc9474 (diff) | |
download | llvm-399bc48eccf0d983a8a4644c12ed9cc21ff33f33.zip llvm-399bc48eccf0d983a8a4644c12ed9cc21ff33f33.tar.gz llvm-399bc48eccf0d983a8a4644c12ed9cc21ff33f33.tar.bz2 |
[CodeView] Fix inline sites that are missing code offsets.
When an inline site has a starting code offset of 0, we sometimes
don't emit the starting offset.
Bug: https://bugs.llvm.org/show_bug.cgi?id=48377
Differential Revision: https://reviews.llvm.org/D92590
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 7849196..3da1a9c 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -563,10 +563,7 @@ void CodeViewContext::encodeInlineLineTable(MCAsmLayout &Layout, int LineDelta = CurSourceLoc.Line - LastSourceLoc.Line; unsigned EncodedLineDelta = encodeSignedNumber(LineDelta); unsigned CodeDelta = computeLabelDiff(Layout, LastLabel, Loc.getLabel()); - if (CodeDelta == 0 && LineDelta != 0) { - compressAnnotation(BinaryAnnotationsOpCode::ChangeLineOffset, Buffer); - compressAnnotation(EncodedLineDelta, Buffer); - } else if (EncodedLineDelta < 0x8 && CodeDelta <= 0xf) { + if (EncodedLineDelta < 0x8 && CodeDelta <= 0xf) { // The ChangeCodeOffsetAndLineOffset combination opcode is used when the // encoded line delta uses 3 or fewer set bits and the code offset fits // in one nibble. |