diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-03-21 09:08:58 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-03-21 09:08:58 +0000 |
| commit | 76e562ab1b4b1c1e180f763f21ee69ae1193fa72 (patch) | |
| tree | ef2d5f8dc1cd2de162835d78370a415c3a46ce17 | |
| parent | 90a528ba7ac9f6e6e1f81e70e5e7c557a4b63dc0 (diff) | |
| download | bcm5719-llvm-76e562ab1b4b1c1e180f763f21ee69ae1193fa72.tar.gz bcm5719-llvm-76e562ab1b4b1c1e180f763f21ee69ae1193fa72.zip | |
[ELF] - Detemplate InputSectionBase::uncompress(). NFC
llvm-svn: 298351
| -rw-r--r-- | lld/ELF/Driver.cpp | 2 | ||||
| -rw-r--r-- | lld/ELF/InputSection.cpp | 10 | ||||
| -rw-r--r-- | lld/ELF/InputSection.h | 2 |
3 files changed, 4 insertions, 10 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 9203d3c2861..1689c8e9002 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -929,7 +929,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) { if (!S->Live) return; if (Decompressor::isCompressedELFSection(S->Flags, S->Name)) - S->uncompress<ELFT>(); + S->uncompress(); if (auto *MS = dyn_cast<MergeInputSection>(S)) MS->splitIntoPieces(); }); diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 4549dfd6f9a..0499e4d1d5e 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -139,10 +139,9 @@ OutputSection *SectionBase::getOutputSection() { // Uncompress section contents. Note that this function is called // from parallel_for_each, so it must be thread-safe. -template <class ELFT> void InputSectionBase::uncompress() { +void InputSectionBase::uncompress() { Decompressor Dec = check(Decompressor::create( - Name, toStringRef(Data), ELFT::TargetEndianness == llvm::support::little, - ELFT::Is64Bits)); + Name, toStringRef(Data), Config->IsLE, Config->Wordsize == 8)); size_t Size = Dec.getDecompressedSize(); char *OutputBuf; @@ -824,11 +823,6 @@ template void InputSection::writeTo<ELF32BE>(uint8_t *Buf); template void InputSection::writeTo<ELF64LE>(uint8_t *Buf); template void InputSection::writeTo<ELF64BE>(uint8_t *Buf); -template void InputSectionBase::uncompress<ELF32LE>(); -template void InputSectionBase::uncompress<ELF32BE>(); -template void InputSectionBase::uncompress<ELF64LE>(); -template void InputSectionBase::uncompress<ELF64BE>(); - template InputSectionBase *InputSection::getRelocatedSection<ELF32LE>(); template InputSectionBase *InputSection::getRelocatedSection<ELF32BE>(); template InputSectionBase *InputSection::getRelocatedSection<ELF64LE>(); diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index f54ddbb89aa..22eb33f779e 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -159,7 +159,7 @@ public: InputSectionBase *getLinkOrderDep() const; - template <class ELFT> void uncompress(); + void uncompress(); // Returns a source location string. Used to construct an error message. template <class ELFT> std::string getLocation(uint64_t Offset); |

