summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/Writer.cpp')
-rw-r--r--lld/COFF/Writer.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 952124a81aa..b14cbb47dc7 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -543,14 +543,10 @@ void Writer::createImportTables() {
std::string DLL = StringRef(File->DLLName).lower();
if (Config->DLLOrder.count(DLL) == 0)
Config->DLLOrder[DLL] = Config->DLLOrder.size();
- }
-
- for (ImportFile *File : ImportFile::Instances) {
- if (!File->Live)
- continue;
if (DefinedImportThunk *Thunk = File->ThunkSym)
- TextSec->addChunk(Thunk->getChunk());
+ if (File->ThunkLive)
+ TextSec->addChunk(Thunk->getChunk());
if (Config->DelayLoads.count(StringRef(File->DLLName).lower())) {
if (!File->ThunkSym)
OpenPOWER on IntegriCloud