[lld] r297734 - [ELF] - Remove unnecessary template #6. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 04:31:29 PDT 2017


Author: grimar
Date: Tue Mar 14 06:31:28 2017
New Revision: 297734

URL: http://llvm.org/viewvc/llvm-project?rev=297734&view=rev
Log:
[ELF] - Remove unnecessary template #6. NFC.

Modified:
    lld/trunk/ELF/LinkerScript.cpp

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=297734&r1=297733&r2=297734&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Tue Mar 14 06:31:28 2017
@@ -518,7 +518,6 @@ template <class ELFT> void LinkerScript<
   }
 }
 
-template <class ELFT>
 static OutputSection *
 findSection(StringRef Name, const std::vector<OutputSection *> &Sections) {
   auto End = Sections.end();
@@ -571,7 +570,7 @@ MemoryRegion *LinkerScript<ELFT>::findMe
 // for a single sections command (e.g. ".text { *(.text); }").
 template <class ELFT>
 void LinkerScript<ELFT>::assignOffsets(OutputSectionCommand *Cmd) {
-  OutputSection *Sec = findSection<ELFT>(Cmd->Name, *OutputSections);
+  OutputSection *Sec = findSection(Cmd->Name, *OutputSections);
   if (!Sec)
     return;
 
@@ -618,7 +617,7 @@ template <class ELFT> void LinkerScript<
       Opt.Commands.begin(), Opt.Commands.end(),
       [&](const std::unique_ptr<BaseCommand> &Base) {
         if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base.get()))
-          return !findSection<ELFT>(Cmd->Name, *OutputSections);
+          return !findSection(Cmd->Name, *OutputSections);
         return false;
       });
   Opt.Commands.erase(Pos, Opt.Commands.end());
@@ -642,7 +641,7 @@ template <class ELFT> void LinkerScript<
     auto *Cmd = dyn_cast<OutputSectionCommand>(Base.get());
     if (!Cmd)
       continue;
-    if (OutputSection *Sec = findSection<ELFT>(Cmd->Name, *OutputSections)) {
+    if (OutputSection *Sec = findSection(Cmd->Name, *OutputSections)) {
       Flags = Sec->Flags;
       Type = Sec->Type;
       continue;




More information about the llvm-commits mailing list