diff options
Diffstat (limited to 'COFF/MarkLive.cpp')
| -rw-r--r-- | COFF/MarkLive.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/COFF/MarkLive.cpp b/COFF/MarkLive.cpp index 01be60d12d82..57ae450a9138 100644 --- a/COFF/MarkLive.cpp +++ b/COFF/MarkLive.cpp @@ -9,16 +9,21 @@ #include "Chunks.h" #include "Symbols.h" +#include "lld/Common/Timer.h" #include "llvm/ADT/STLExtras.h" #include <vector> namespace lld { namespace coff { +static Timer GCTimer("GC", Timer::root()); + // Set live bit on for each reachable chunk. Unmarked (unreachable) // COMDAT chunks will be ignored by Writer, so they will be excluded // from the final output. void markLive(ArrayRef<Chunk *> Chunks) { + ScopedTimer T(GCTimer); + // We build up a worklist of sections which have been marked as live. We only // push into the worklist when we discover an unmarked section, and we mark // as we push, so sections never appear twice in the list. @@ -43,7 +48,7 @@ void markLive(ArrayRef<Chunk *> Chunks) { else if (auto *Sym = dyn_cast<DefinedImportData>(B)) Sym->File->Live = true; else if (auto *Sym = dyn_cast<DefinedImportThunk>(B)) - Sym->WrappedSym->File->Live = true; + Sym->WrappedSym->File->Live = Sym->WrappedSym->File->ThunkLive = true; }; // Add GC root chunks. |
