[PATCH] D74169: [WIP][LLD][ELF][DebugInfo] Remove obsolete debug info.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 01:26:31 PDT 2020


avl added inline comments.


================
Comment at: lld/ELF/LLDDwarfLinker.cpp:80
+          SymbolAddresses addr = getSymbolAddresses(symbol, sec);
+          addressRanges[{addr.objectAddress, secToIndex[sec]}] = {
+              addr.objectAddress + symbol->getSize(),
----------------
ayermolo wrote:
> The RangesTy is defined as a map with uint64_t
> using RangesTy = std::map<uint64_t, ObjFileAddressRange>;
> 
> Not sure I follow how this works. Am I missing some c++ thing? This fails to compile with clang.
The RangesTy is defined as a map with object::SectionedAddress.

/// Map LowPC to AddressHighPC.
using RangesTy = std::map<object::SectionedAddress, AddressHighPC>;

It looks like your local source files are in inconsistent state. This patch was build successfully by pre-merge build bot.


================
Comment at: lld/ELF/LLDDwarfLinker.cpp:222
+  debugInfoLinker.setAccelTableKind(config->debugNames ? AccelTableKind::Dwarf
+                                                       : AccelTableKind::None);
+  debugInfoLinker.setErrorHandler(ReportWarn);
----------------
ayermolo wrote:
> There is no AccelTableKind::None, did you mean AccelTableKind::Default?
> 
> enum class AccelTableKind {
>   Apple,   ///< .apple_names, .apple_namespaces, .apple_types, .apple_objc.
>   Dwarf,   ///< DWARF v5 .debug_names.
>   Default, ///< Dwarf for DWARF5 or later, Apple otherwise.
> };
It is added by this patch at line 29 of llvm/include/llvm/DWARFLinker/DWARFLinker.h.


================
Comment at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:29
   Default, ///< Dwarf for DWARF5 or later, Apple otherwise.
+  None,    ///< do not generate accelerator tables.
 };
----------------
Here is the place where AccelTableKind::None is defined.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74169



More information about the llvm-commits mailing list