[PATCH] D104353: [lld-macho] Avoid force-loading the same archive twice
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 17:21:43 PDT 2021
thakis added inline comments.
================
Comment at: lld/MachO/Driver.cpp:268
for (const ArchiveMember &member : getArchiveMembers(*buffer)) {
if (Optional<InputFile *> file = loadArchiveMember(
member.mbref, member.modTime, path, /*objCOnly=*/false)) {
----------------
I don't know if that's what's happening, but if loadArchiveMember() loads a .o file that contains LC_LINKER_OPTIONS that has a -l flag that can recursively call addFile() again which can resize loadedArchives and invalidate the cachedFile ref.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104353/new/
https://reviews.llvm.org/D104353
More information about the llvm-commits
mailing list