diff --git a/lib/MC/MCCodeView.cpp b/lib/MC/MCCodeView.cpp index 7849196432b..3da1a9c3e33 100644 --- a/lib/MC/MCCodeView.cpp +++ b/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. diff --git a/test/MC/COFF/cv-inline-linetable-infloop.s b/test/MC/COFF/cv-inline-linetable-infloop.s index 3802a0eeda7..6246623cd9b 100644 --- a/test/MC/COFF/cv-inline-linetable-infloop.s +++ b/test/MC/COFF/cv-inline-linetable-infloop.s @@ -2,7 +2,7 @@ # CHECK: InlineSiteSym { # CHECK: BinaryAnnotations [ -# CHECK: ChangeLineOffset: 1 +# CHECK: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x0, LineOffset: 1} # CHECK: ChangeCodeLength: 0x2 # CHECK: ] # CHECK: } diff --git a/test/MC/COFF/cv-loc-unreachable-2.s b/test/MC/COFF/cv-loc-unreachable-2.s index 2906622ddd7..4e5b331dfd6 100644 --- a/test/MC/COFF/cv-loc-unreachable-2.s +++ b/test/MC/COFF/cv-loc-unreachable-2.s @@ -23,7 +23,7 @@ # CODEVIEW: S_INLINESITE [size = 26] # CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 0 -# CODEVIEW-NEXT: 0602 line 1 (+1) +# CODEVIEW-NEXT: 0B20 code 0x0 (+0x0) line 1 (+1) # CODEVIEW-NEXT: 0409 code end 0x9 (+0x9) # CODEVIEW-NEXT: 0B21 code 0xA (+0x1) line 2 (+1) # CODEVIEW-NEXT: 0B28 code 0x12 (+0x8) line 3 (+1) diff --git a/test/MC/COFF/cv-loc-unreachable.s b/test/MC/COFF/cv-loc-unreachable.s index 333fb4523f5..f35ed305530 100644 --- a/test/MC/COFF/cv-loc-unreachable.s +++ b/test/MC/COFF/cv-loc-unreachable.s @@ -34,7 +34,7 @@ # CODEVIEW: S_INLINESITE [size = 26] # CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 0 -# CODEVIEW-NEXT: 0602 line 1 (+1) +# CODEVIEW-NEXT: 0B20 code 0x0 (+0x0) line 1 (+1) # CODEVIEW-NEXT: 0409 code end 0x9 (+0x9) # CODEVIEW-NEXT: 0B21 code 0xA (+0x1) line 2 (+1) # CODEVIEW-NEXT: 0B28 code 0x12 (+0x8) line 3 (+1)