Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld-macho] Simplify archive loading logic
This is a follow-on to {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. I've also added another test to check that CLI library non-force-loads take precedence over `LC_LINKER_OPTION` + `-force_load_swift_libs`. (The existing logic is correct, just untested.) Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D130137
- Loading branch information
Showing
3 changed files
with
64 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters