[lld] [LLD][COFF] Make /wholearchive thin-archive member identifiers consistent (PR #145487)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 07:31:03 PDT 2025
================
@@ -275,7 +275,12 @@ void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> mb,
int memberIndex = 0;
for (MemoryBufferRef m : getArchiveMembers(ctx, archive))
- addArchiveBuffer(m, "<whole-archive>", filename, memberIndex++);
+ if (!archive->isThin())
+ addArchiveBuffer(m, "<whole-archive>", filename, memberIndex++);
+ else
+ // Pass empty string as archive name so that the original filename is
+ // used as the buffer identifier.
----------------
bd1976bris wrote:
Done. I now use a common function to add thin archive members so that I don't have to duplicate this comment in two places.
https://github.com/llvm/llvm-project/pull/145487
More information about the llvm-commits
mailing list