Re-submit r303225: Garbage collect dllimported symbols.
authorRui Ueyama <ruiu@google.com>
Wed, 17 May 2017 21:36:08 +0000 (21:36 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 17 May 2017 21:36:08 +0000 (21:36 +0000)
commitcd41bc8dec216d909e6edb4357194b4797acfd5c
treebc68396a75f99926680b6e76ce3743af70037232
parent2525e4e4c21c1af3f0f3ed969fb42baa5e37d7e1
Re-submit r303225: Garbage collect dllimported symbols.

This reverts re-submits r303225 which was reverted in r303270 because it
broke the sanitizer-windows bot.

The reason of the failure is that we were writing dead symbols to the
symbol table. I fixed the issue.

llvm-svn: 303304
lld/COFF/InputFiles.cpp
lld/COFF/MarkLive.cpp
lld/COFF/Symbols.cpp
lld/COFF/Symbols.h
lld/COFF/Writer.cpp
lld/test/COFF/Inputs/import.yaml
lld/test/COFF/dllimport-gc.test [new file with mode: 0644]