[PATCH] D78474: [llvm-objcopy][MachO] Make --remove-section clean up dead symbols
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 19 23:57:45 PDT 2020
smeenai added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.cpp:30
+ for (LoadCommand &LC : LoadCommands) {
+ auto It = std::stable_partition(
+ std::begin(LC.Sections), std::end(LC.Sections),
----------------
This is gonna reorder the actual section load commands, right? Is that okay?
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.cpp:43
+
+ std::unordered_set<const SymbolEntry *> DeadSymbols;
+ for (const std::unique_ptr<SymbolEntry> &Sym : SymTable.Symbols)
----------------
Would SmallPtrSet be better?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78474/new/
https://reviews.llvm.org/D78474
More information about the llvm-commits
mailing list