[COFF] clean up global resources after completion
authorRui Ueyama <ruiu@google.com>
Thu, 26 Jul 2018 17:11:24 +0000 (17:11 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 26 Jul 2018 17:11:24 +0000 (17:11 +0000)
commit279621fbf0ab3758784bf79139711ae3424f69ec
treef22c770ffb483150733a571db8a0d4e48afa5407
parentcb6a933c9bd010f06b0ae50893afb3f821bd5fe0
[COFF] clean up global resources after completion

Patch by Andrew Kelley.

Previously, running lld::coff::link() twice in the same process would
access stale pointers because of these global variables not being reset.
After this patch, lld::coff::link() can be called any number of times,
just like its ELF and MACH-O counterparts.

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

llvm-svn: 338042
lld/COFF/Driver.cpp