diff options
Diffstat (limited to 'lld/COFF/Chunks.cpp')
-rw-r--r-- | lld/COFF/Chunks.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp index e83a8c6e458..df98a041cd5 100644 --- a/lld/COFF/Chunks.cpp +++ b/lld/COFF/Chunks.cpp @@ -38,9 +38,6 @@ SectionChunk::SectionChunk(ObjFile *F, const coff_section *H) Alignment = Header->getAlignment(); - // Chunks may be discarded during comdat merging. - Discarded = false; - // If linker GC is disabled, every chunk starts out alive. If linker GC is // enabled, treat non-comdat sections as roots. Generally optimized object // files will be built with -ffunction-sections or /Gy, so most things worth @@ -362,12 +359,8 @@ bool SectionChunk::isCOMDAT() const { void SectionChunk::printDiscardedMessage() const { // Removed by dead-stripping. If it's removed by ICF, ICF already // printed out the name, so don't repeat that here. - if (Sym && this == Repl) { - if (Discarded) - message("Discarded comdat symbol " + Sym->getName()); - else if (!Live) - message("Discarded " + Sym->getName()); - } + if (Sym && this == Repl) + message("Discarded " + Sym->getName()); } StringRef SectionChunk::getDebugName() { |