[PATCH] D75188: [NFC][DebugInfo] Refactor address advancing operations to share code

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 03:26:46 PST 2020


jhenderson marked an inline comment as done.
jhenderson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:917
         {
-          uint8_t AdjustOpcode = 255 - Prologue.OpcodeBase;
-          uint64_t AddrOffset =
-              (AdjustOpcode / Prologue.LineRange) * Prologue.MinInstLength;
-          State.Row.Address.Address += AddrOffset;
+          uint64_t AddrOffset = State.advanceAddrForOpcode(255).AddrDelta;
           if (OS)
----------------
probinson wrote:
> It seems like there ought to be a symbol for opcode 255, but you inherited the code so I won't insist.
I can add that in a separate change if you'd like, although I'm not entirely sure what I'd label it as, since the DWARF spec (as quoted by the comment above) simply calls it the "special opcode 255".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75188/new/

https://reviews.llvm.org/D75188





More information about the llvm-commits mailing list