[all-commits] [llvm/llvm-project] 3a35ca: [lldb][DWARFASTParserClang][NFCI] Extract DW_AT_da...

Michael Buch via All-commits all-commits at lists.llvm.org
Thu Oct 5 02:49:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a35ca01fc55f27315d1652ec1dedff10e79918b
      https://github.com/llvm/llvm-project/commit/3a35ca01fc55f27315d1652ec1dedff10e79918b
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

  Log Message:
  -----------
  [lldb][DWARFASTParserClang][NFCI] Extract DW_AT_data_member_location calculation logic (#68231)

Currently this non-trivial calculation is repeated multiple times,
making it hard to reason about when the
`byte_offset`/`member_byte_offset` is being set or not.

This patch simply moves all those instances of the same calculation into
a helper function.

We return an optional to remain an NFC patch. Default initializing the
offset would make sense but requires further analysis and can be done in
a follow-up patch.




More information about the All-commits mailing list