[ELF][Distributed ThinLTO] Do not generate empty index when bitcode object is linked
authorWei Wang <apollo.mobility@gmail.com>
Tue, 13 Sep 2022 00:35:51 +0000 (17:35 -0700)
committerWei Wang <apollo.mobility@gmail.com>
Tue, 13 Sep 2022 21:34:41 +0000 (14:34 -0700)
commit5529a7524ad72962deba9ba061296f8b169d938f
tree7978ac0fc95ec708589f8b2d65bae31c5c6f19c3
parent588628de3e954d8029b20841aceb612e328ae104
[ELF][Distributed ThinLTO] Do not generate empty index when bitcode object is linked

When the same bitcode object file is given multiple times from the Command-line
as lazy object file, empty index is generated which overwrites the one from thinlink.
This could cause undefined symbols during final link.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D133740
lld/ELF/LTO.cpp
lld/test/ELF/lto/thinlto-index-only.ll