llvm.org GIT mirror llvm / b0c1ff7
[codeview] Revert inline line table change of r362264 Testing with debuggers shows that our previous behavior was correct. The reason I thought MSVC did things differently is that MSVC prefers to use the 0xB combined code offset and code length update opcode when inline sites are discontiguous. Keep the test changes, and update the llvm-pdbutil inline line table dumper to account for this new interpretation of the opcodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362277 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 2 months ago
5 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
534534 unsigned Length = computeLabelDiff(Layout, LastLabel, Loc.getLabel());
535535 compressAnnotation(BinaryAnnotationsOpCode::ChangeCodeLength, Buffer);
536536 compressAnnotation(Length, Buffer);
537 LastLabel = Loc.getLabel();
537538 }
538539 HaveOpenRange = false;
539540 continue;
3535 # ASM-NEXT: 2b: 0f 0b ud2
3636 # End inline loc
3737
38 # CODEVIEW: S_INLINESITE [size = 26]
38 # CODEVIEW: S_INLINESITE [size = 24]
3939 # CODEVIEW-NEXT: inlinee = 0x1002 (f), parent = 0, end = 0
4040 # CODEVIEW-NEXT: 0B2E code 0xE (+0xE) line 1 (+1)
4141 # CODEVIEW-NEXT: 0409 code end 0x17 (+0x9)
42 # CODEVIEW-NEXT: 0602 line 2 (+1)
43 # CODEVIEW-NEXT: 0318 code 0x26 (+0x18)
42 # CODEVIEW-NEXT: 0B2F code 0x26 (+0xF) line 2 (+1)
4443 # CODEVIEW-NEXT: 0407 code end 0x2D (+0x7)
4544
4645 .text
2424 # CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 0
2525 # CODEVIEW-NEXT: 0602 line 1 (+1)
2626 # CODEVIEW-NEXT: 0409 code end 0x9 (+0x9)
27 # CODEVIEW-NEXT: 0B2A code 0xA (+0xA) line 2 (+1)
27 # CODEVIEW-NEXT: 0B21 code 0xA (+0x1) line 2 (+1)
2828 # CODEVIEW-NEXT: 0B28 code 0x12 (+0x8) line 3 (+1)
2929 # CODEVIEW-NEXT: 0400 code end 0x12 (+0x0)
3030
3535 # CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 0
3636 # CODEVIEW-NEXT: 0602 line 1 (+1)
3737 # CODEVIEW-NEXT: 0409 code end 0x9 (+0x9)
38 # CODEVIEW-NEXT: 0B2A code 0xA (+0xA) line 2 (+1)
38 # CODEVIEW-NEXT: 0B21 code 0xA (+0x1) line 2 (+1)
3939 # CODEVIEW-NEXT: 0B28 code 0x12 (+0x8) line 3 (+1)
4040 # CODEVIEW-NEXT: 0400 code end 0x12 (+0x0)
4141
688688 break;
689689 case BinaryAnnotationsOpCode::ChangeCodeLength:
690690 formatCodeLength(Annot.U1);
691 // Apparently this annotation updates the code offset. It's hard to make
692 // MSVC produce this opcode, but clang uses it, and debuggers seem to use
693 // this interpretation.
694 CodeOffset += Annot.U1;
691695 break;
692696 case BinaryAnnotationsOpCode::ChangeCodeOffsetAndLineOffset:
693697 formatCodeOffset(Annot.U1);