[lld] r298351 - [ELF] - Detemplate InputSectionBase::uncompress(). NFC

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 02:08:58 PDT 2017


Author: grimar
Date: Tue Mar 21 04:08:58 2017
New Revision: 298351

URL: http://llvm.org/viewvc/llvm-project?rev=298351&view=rev
Log:
[ELF] - Detemplate InputSectionBase::uncompress(). NFC

Modified:
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/InputSection.cpp
    lld/trunk/ELF/InputSection.h

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=298351&r1=298350&r2=298351&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Mar 21 04:08:58 2017
@@ -929,7 +929,7 @@ template <class ELFT> void LinkerDriver:
     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();
   });

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=298351&r1=298350&r2=298351&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Tue Mar 21 04:08:58 2017
@@ -139,10 +139,9 @@ OutputSection *SectionBase::getOutputSec
 
 // 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<ELF3
 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>();

Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=298351&r1=298350&r2=298351&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Tue Mar 21 04:08:58 2017
@@ -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);




More information about the llvm-commits mailing list