[re-land][lld-macho] Avoid force-loading the same archive twice
authorJez Ng <jezng@fb.com>
Sat, 19 Jun 2021 02:30:57 +0000 (22:30 -0400)
committerJez Ng <jezng@fb.com>
Sat, 19 Jun 2021 02:43:50 +0000 (22:43 -0400)
commit4507f64165fd0c95f08b66d61db39549b22c50d3
tree91159be1f39f0ad0ec1fa0b18f51e212a2d2060e
parenta79c01832553a8a192ab157098662a9e8f2c16af
[re-land][lld-macho] Avoid force-loading the same archive twice

This reverts commit c9b241efd68c5a0f1f67e9250960ade454f3bc11, which was
a backout diff to fix the buildbots.

The real culprit of the crash is
https://github.com/llvm/llvm-project/commit/1d31fb8d122b1117cf20a9edc09812db8472e930,
which is being reverted.

Differential Revision: https://reviews.llvm.org/D104353
lld/MachO/Driver.cpp
lld/test/MachO/archive.s
lld/test/MachO/force-load.s