Revert "[LLD] Remove global state in lld/COFF"
authorMartin Storsjö <martin@martin.st>
Mon, 9 Jan 2023 14:04:09 +0000 (16:04 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 9 Jan 2023 14:04:44 +0000 (16:04 +0200)
commit398c2ad6f684a6d06daef52f5aee1d9d2761a659
treefffffe667ca1a303dfeaa9a7621ca04449569a5d
parent35b8bb0ab3af4cc60c14a499342ab92620059d18
Revert "[LLD] Remove global state in lld/COFF"

This reverts commit 7370ff624d217b0f8f7512ca5b651a9b8095a411.
(and 47fb8ae2f9a4075de05433ef24f459b6befd1730).

This commit broke the symbol type in import libraries generated
for mingw autoexported symbols, when the source files were built
with LTO. I'll commit a testcase that showcases this issue after
the revert.
31 files changed:
lld/COFF/COFFLinkerContext.cpp
lld/COFF/COFFLinkerContext.h
lld/COFF/CallGraphSort.cpp
lld/COFF/Chunks.cpp
lld/COFF/Chunks.h
lld/COFF/Config.h
lld/COFF/DLL.cpp
lld/COFF/DLL.h
lld/COFF/DebugTypes.cpp
lld/COFF/Driver.cpp
lld/COFF/Driver.h
lld/COFF/DriverUtils.cpp
lld/COFF/ICF.cpp
lld/COFF/ICF.h
lld/COFF/InputFiles.cpp
lld/COFF/InputFiles.h
lld/COFF/LLDMapFile.cpp
lld/COFF/LTO.cpp
lld/COFF/LTO.h
lld/COFF/MapFile.cpp
lld/COFF/MarkLive.cpp
lld/COFF/MinGW.cpp
lld/COFF/MinGW.h
lld/COFF/PDB.cpp
lld/COFF/SymbolTable.cpp
lld/COFF/SymbolTable.h
lld/COFF/Symbols.cpp
lld/COFF/Symbols.h
lld/COFF/TypeMerger.h
lld/COFF/Writer.cpp
lld/COFF/Writer.h