[PATCH] D98837: [lld][MachO] Refactor handling of subsections

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 17 18:44:42 PDT 2021


alexshap created this revision.
alexshap added reviewers: lld-macho, int3.
Herald added a subscriber: mgrang.
Herald added a project: lld-macho.
alexshap requested review of this revision.
Herald added a project: LLVM.

This diff is a preparation for fixing FunStabs (incorrect size calculation).
std::map<uint32_t, InputSection*> (SubsectionMap) is replaced with a sorted vector + binary search.
If .subsections_via_symbols is set this vector will contain the list of subsections,
otherwise,  the offsets will be used for calculating the symbols sizes (in a follow-up patch).

Test plan: make check-all


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98837

Files:
  lld/MachO/InputFiles.cpp
  lld/MachO/InputFiles.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98837.331439.patch
Type: text/x-patch
Size: 5877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210318/227cdf1d/attachment.bin>


More information about the llvm-commits mailing list