[PATCH] D130137: [lld-macho] Simplify archive loading logic

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 18:21:09 PDT 2022


int3 created this revision.
int3 added reviewers: lld-macho, PRESIDENT810.
Herald added projects: lld-macho, All.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a follow-on to D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line <https://reviews.llvm.org/D129556>. I've refactored the code such that
`addFile()` no longer needs to take an extra parameter. Additionally,
the "do we force-load or not" policy logic is now fully contained within
addFile, instead of being split between `addFile` and
`parseLCLinkerOptions`. This also allows us to move the `ForceLoad` (now
`LoadType`) enum out of the header file.

Additionally, we can now correctly report loads induced by
`LC_LINKER_OPTION` in our `-why_load` output.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130137

Files:
  lld/MachO/Config.h
  lld/MachO/Driver.cpp
  lld/test/MachO/force-load-swift-libs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130137.446002.patch
Type: text/x-patch
Size: 10694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220720/b1200f88/attachment.bin>


More information about the llvm-commits mailing list