[PATCH] D132371: [DWARFLinker][NFC] Change interface of DWARFLinker to specify accel table kinds explicitly.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 05:40:02 PDT 2022


avl created this revision.
avl added reviewers: aprantl, JDevlieghere, clayborg.
Herald added a subscriber: hiraditya.
Herald added a project: All.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, DWARFLinker receives kind of accel tables as predefined sets:

  Apple,   ///< .apple_names, .apple_namespaces, .apple_types, .apple_objc.
  Dwarf,   ///< DWARF v5 .debug_names.
  Default, ///< Dwarf for DWARF5 or later, Apple otherwise.
  Pub,     ///< .debug_pubnames, .debug_pubtypes

This patch changes above to the explicit set of tables:

  AppleNamespaces,
  AppleNames,
  AppleTypes,
  AppleObjC,
  PubNames,
  PubTypes,
  DebugNames,

It allows seamlessness adding more accel tables in the future: .gdb_index, .debug_cu_index...
It also allows specifying all possible combinations of them. (Not that we need all possible combinations,
but it would be possible to not change interface when new combinations should be added).
Doing things that way, DWARFLinker will be independent of consumers' requirements.
f.e. dsymutil and llvm-dwarfutil may have different variants for Default set
(so, instead of implementing these differencies inside DWARFLinker it could be
implemented in the corresponding module).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132371

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
  llvm/tools/dsymutil/LinkUtils.h
  llvm/tools/dsymutil/dsymutil.cpp
  llvm/tools/llvm-dwarfutil/DebugInfoLinker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132371.454468.patch
Type: text/x-patch
Size: 19388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220822/575494ff/attachment.bin>


More information about the llvm-commits mailing list