[PATCH] D114737: [lld][Macho] Include dead-stripped symbols in mapfile

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 28 09:38:29 PST 2022


int3 added inline comments.


================
Comment at: lld/MachO/MapFile.cpp:46
+// the right element is a container of all dead symbols.
+static std::pair<Symbols, Symbols> getSymbols() {
+  Symbols liveSymbols, deadSymbols;
----------------
oontvoo wrote:
> It seems the `deadSymbols` is only ever used if `config->deadStrip`. 
> Can this function take a flag (eg., includeDead) and not collect or sort dead symbols when the flag is not set?
when the flag's not set, the `deadSymbols` vector will be empty anyway, so sorting will be a no-op.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114737



More information about the llvm-commits mailing list