[lld] r324951 - Do not use Decompressor::isCompressedELFSection. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 14:32:57 PST 2018
Author: ruiu
Date: Mon Feb 12 14:32:57 2018
New Revision: 324951
URL: http://llvm.org/viewvc/llvm-project?rev=324951&view=rev
Log:
Do not use Decompressor::isCompressedELFSection. NFC.
In order to identify a compressed section, we check if a section name
starts with ".zdebug" or the section has SHF_COMPRESSED flag. We already
use the knowledge in this function. So hiding that check in
isCompressedELFSection doesn't make sense.
Modified:
lld/trunk/ELF/InputSection.cpp
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=324951&r1=324950&r2=324951&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Mon Feb 12 14:32:57 2018
@@ -178,7 +178,9 @@ OutputSection *SectionBase::getOutputSec
// Decompress section contents if required. Note that this function
// is called from parallelForEach, so it must be thread-safe.
void InputSectionBase::maybeDecompress() {
- if (DecompressBuf || !Decompressor::isCompressedELFSection(Flags, Name))
+ if (DecompressBuf)
+ return;
+ if (!(Flags & SHF_COMPRESSED) && !Name.startswith(".zdebug"))
return;
// Decompress a section.
More information about the llvm-commits
mailing list