[PATCH] D33264: Garbage collect dllimported symbols.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 16:22:11 PDT 2017


ruiu created this revision.

Previously, the garbage collector (enabled by default or by explicitly
passing /opt:ref) did not kill dllimported symbols. As a result,
dllimported symbols could be added to resulting executables' dllimport
list even if no one was actually using them.

This patch implements dllexported symbol garbage collection. Just like
COMDAT sections, dllimported symbols now have Live bits to manage their
liveness, and MarkLive marks reachable dllimported symbols.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32950


https://reviews.llvm.org/D33264

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33264.99224.patch
Type: text/x-patch
Size: 9730 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170516/63191cd1/attachment.bin>


More information about the llvm-commits mailing list