diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-02-12 22:32:57 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-02-12 22:32:57 +0000 |
| commit | 005e7c3d758053d06b4790971321305a1dc1f247 (patch) | |
| tree | fa439a8a1017505758b0b5888acab41aa79f4664 | |
| parent | 126cf39d09c0218776af79c60b238fd0f2c71001 (diff) | |
| download | bcm5719-llvm-005e7c3d758053d06b4790971321305a1dc1f247.tar.gz bcm5719-llvm-005e7c3d758053d06b4790971321305a1dc1f247.zip | |
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.
llvm-svn: 324951
| -rw-r--r-- | lld/ELF/InputSection.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 769cc090ee3..6766c00915d 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -178,7 +178,9 @@ OutputSection *SectionBase::getOutputSection() { // 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. |

