[lld-macho] Tweak the names we give to archive members
authorJez Ng <jezng@fb.com>
Thu, 20 Apr 2023 21:23:36 +0000 (17:23 -0400)
committerJez Ng <jezng@fb.com>
Thu, 20 Apr 2023 21:24:06 +0000 (17:24 -0400)
commit9df7daa5ef912957c708382c0860e01d1cd3b4c8
tree06f9c1cd62bb9a1c5f46801e91c1f4b09be81923
parenta7cfcc686b7522abe10ff03d4ada160732646a0d
[lld-macho] Tweak the names we give to archive members

In particular, make it `foo.a(foo.o)$ARCHIVE_OFFSET`. The goal is to
make it more similar to both ld64 implementation, which uses the
`foo.a(foo.o)$MODULE_ID` format. We dump some of these names in LTO
code, so matching ld64's format is helpful. This format is also more
similar to LLD-ELF's, which is `foo.a(foo.o at $ARCHIVE_OFFSET)`.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D148828
lld/MachO/InputFiles.cpp
lld/test/MachO/lto-archivecollision.ll