diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-02-12 21:56:14 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-02-12 21:56:14 +0000 |
| commit | ac114d27ae066e9950ab930c35274361c07b9b8d (patch) | |
| tree | 74e301e202d84726630756e4d9e7016949055fd1 | |
| parent | edcd56482066d78edac2d1471712f6bfac481646 (diff) | |
| download | bcm5719-llvm-ac114d27ae066e9950ab930c35274361c07b9b8d.tar.gz bcm5719-llvm-ac114d27ae066e9950ab930c35274361c07b9b8d.zip | |
s/uncompress/decompress/g.
In lld, we use both "uncompress" and "decompress" which is confusing.
Since LLVM uses "decompress", we should use the same term.
llvm-svn: 324944
| -rw-r--r-- | lld/ELF/GdbIndex.cpp | 2 | ||||
| -rw-r--r-- | lld/ELF/InputSection.cpp | 12 | ||||
| -rw-r--r-- | lld/ELF/InputSection.h | 6 | ||||
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/lld/ELF/GdbIndex.cpp b/lld/ELF/GdbIndex.cpp index d27b57f9593..85449a20064 100644 --- a/lld/ELF/GdbIndex.cpp +++ b/lld/ELF/GdbIndex.cpp @@ -34,7 +34,7 @@ template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) { .Case(".debug_ranges", &RangeSection) .Case(".debug_line", &LineSection) .Default(nullptr)) { - Sec->maybeUncompress(); + Sec->maybeDecompress(); M->Data = toStringRef(Sec->Data); M->Sec = Sec; continue; diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 428637a54e5..c9a66f04865 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -175,22 +175,22 @@ OutputSection *SectionBase::getOutputSection() { return Sec ? Sec->getParent() : nullptr; } -// Uncompress section contents if required. Note that this function +// Decompress section contents if required. Note that this function // is called from parallelForEach, so it must be thread-safe. -void InputSectionBase::maybeUncompress() { - if (UncompressBuf || !Decompressor::isCompressedELFSection(Flags, Name)) +void InputSectionBase::maybeDecompress() { + if (DecompressBuf || !Decompressor::isCompressedELFSection(Flags, Name)) return; Decompressor Dec = check(Decompressor::create(Name, toStringRef(Data), Config->IsLE, Config->Is64)); size_t Size = Dec.getDecompressedSize(); - UncompressBuf.reset(new char[Size]()); - if (Error E = Dec.decompress({UncompressBuf.get(), Size})) + DecompressBuf.reset(new char[Size]()); + if (Error E = Dec.decompress({DecompressBuf.get(), Size})) fatal(toString(this) + ": decompress failed: " + llvm::toString(std::move(E))); - Data = makeArrayRef((uint8_t *)UncompressBuf.get(), Size); + Data = makeArrayRef((uint8_t *)DecompressBuf.get(), Size); Flags &= ~(uint64_t)SHF_COMPRESSED; } diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 7c0c611cb0e..58549c30f72 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -164,7 +164,7 @@ public: // Compilers emit zlib-compressed debug sections if the -gz option // is given. This function checks if this section is compressed, and // if so, decompress in memory. - void maybeUncompress(); + void maybeDecompress(); // Returns a source location string. Used to construct an error message. template <class ELFT> std::string getLocation(uint64_t Offset); @@ -189,9 +189,9 @@ public: } private: - // A pointer that owns uncompressed data if a section is compressed by zlib. + // A pointer that owns decompressed data if a section is compressed by zlib. // Since the feature is not used often, this is usually a nullptr. - std::unique_ptr<char[]> UncompressBuf; + std::unique_ptr<char[]> DecompressBuf; }; // SectionPiece represents a piece of splittable section contents. diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 17341f370dc..3a0922f4451 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2482,11 +2482,11 @@ static MergeSyntheticSection *createMergeSynthetic(StringRef Name, return make<MergeNoTailSection>(Name, Type, Flags, Alignment); } -// Debug sections may be compressed by zlib. Uncompress if exists. +// Debug sections may be compressed by zlib. Decompress if exists. void elf::decompressSections() { parallelForEach(InputSections, [](InputSectionBase *Sec) { if (Sec->Live) - Sec->maybeUncompress(); + Sec->maybeDecompress(); }); } |

