[lld] r296311 - De-template InterpSection because it doesn't use ELFT.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 26 18:32:49 PST 2017


Author: ruiu
Date: Sun Feb 26 20:32:49 2017
New Revision: 296311

URL: http://llvm.org/viewvc/llvm-project?rev=296311&view=rev
Log:
De-template InterpSection because it doesn't use ELFT.

Modified:
    lld/trunk/ELF/SyntheticSections.cpp
    lld/trunk/ELF/SyntheticSections.h
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=296311&r1=296310&r2=296311&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Sun Feb 26 20:32:49 2017
@@ -278,7 +278,7 @@ MipsReginfoSection<ELFT> *MipsReginfoSec
   return nullptr;
 }
 
-template <class ELFT> InputSection *elf::createInterpSection() {
+InputSection *elf::createInterpSection() {
   auto *Ret = make<InputSection>(SHF_ALLOC, SHT_PROGBITS, 1,
                                  ArrayRef<uint8_t>(), ".interp");
   Ret->Live = true;
@@ -2218,11 +2218,6 @@ template InputSection *elf::createCommon
 template InputSection *elf::createCommonSection<ELF64LE>();
 template InputSection *elf::createCommonSection<ELF64BE>();
 
-template InputSection *elf::createInterpSection<ELF32LE>();
-template InputSection *elf::createInterpSection<ELF32BE>();
-template InputSection *elf::createInterpSection<ELF64LE>();
-template InputSection *elf::createInterpSection<ELF64BE>();
-
 template MergeInputSection<ELF32LE> *elf::createCommentSection();
 template MergeInputSection<ELF32BE> *elf::createCommentSection();
 template MergeInputSection<ELF64LE> *elf::createCommentSection();

Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=296311&r1=296310&r2=296311&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Sun Feb 26 20:32:49 2017
@@ -790,7 +790,7 @@ private:
 };
 
 template <class ELFT> InputSection *createCommonSection();
-template <class ELFT> InputSection *createInterpSection();
+InputSection *createInterpSection();
 template <class ELFT> MergeInputSection<ELFT> *createCommentSection();
 template <class ELFT>
 SymbolBody *addSyntheticLocal(StringRef Name, uint8_t Type, uint64_t Value,

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=296311&r1=296310&r2=296311&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sun Feb 26 20:32:49 2017
@@ -325,7 +325,7 @@ template <class ELFT> void Writer<ELFT>:
   Out::ProgramHeaders->updateAlignment(sizeof(uintX_t));
 
   if (needsInterpSection<ELFT>()) {
-    In<ELFT>::Interp = createInterpSection<ELFT>();
+    In<ELFT>::Interp = createInterpSection();
     Add(In<ELFT>::Interp);
   } else {
     In<ELFT>::Interp = nullptr;




More information about the llvm-commits mailing list