[COFF] don't mark lazy symbols as used in regular objects
authorBob Haarman <llvm@inglorion.net>
Thu, 6 Sep 2018 20:23:56 +0000 (20:23 +0000)
committerBob Haarman <llvm@inglorion.net>
Thu, 6 Sep 2018 20:23:56 +0000 (20:23 +0000)
commit2ba4d231d1d62c1afe9b123c326d60de7c542d10
tree9749d421841f7bf1e4b22eddea7fef35480ad510
parente19ee2900280c3d9b99f498026dad3405bcf25c7
[COFF] don't mark lazy symbols as used in regular objects

Summary:
r338767 updated the COFF and wasm linker SymbolTable code to be
strutured more like the ELF linker's. That inadvertedly changed the
behavior of the COFF linker so that lazy symbols would be marked as
used in regular objects. This change adds an overload of the insert()
function, similar to the ELF linker, which does not perform that
marking.

Reviewers: ruiu, rnk, hans

Subscribers: aheejin, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D51720

llvm-svn: 341585
lld/COFF/SymbolTable.cpp
lld/COFF/SymbolTable.h
lld/test/COFF/thinlto-archives.ll