[PATCH] D98837: [lld][MachO] Refactor handling of subsections
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 12:52:23 PDT 2021
oontvoo added inline comments.
================
Comment at: lld/MachO/InputFiles.cpp:424-426
+ subsections[sym.n_sect - 1].push_back(
+ {sym.n_value - sectionHeaders[sym.n_sect - 1].addr,
+ subsections[sym.n_sect - 1].front().second});
----------------
nit:
================
Comment at: lld/MachO/InputFiles.h:52
// each subsection from the start of the original pre-split InputSection.
-using SubsectionMap = std::map<uint32_t, InputSection *>;
+using SubsectionMap = std::vector<std::pair<uint32_t, InputSection *>>;
----------------
int3 wrote:
> nit: can we use a struct instead of a pair? I think `first` and `second` aren't very readable
nit: it's not a map ... perhaps you could name it something less mis-leading? :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98837/new/
https://reviews.llvm.org/D98837
More information about the llvm-commits
mailing list