[lld] r297720 - [ELF] - Remove unnecessary template #4. NFC.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 05:57:54 PDT 2017
Thanks a lot for these cleanups!
George Rimar via llvm-commits <llvm-commits at lists.llvm.org> writes:
> Author: grimar
> Date: Tue Mar 14 04:30:25 2017
> New Revision: 297720
>
> URL: http://llvm.org/viewvc/llvm-project?rev=297720&view=rev
> Log:
> [ELF] - Remove unnecessary template #4. NFC.
>
> OutputSectionFactory has no ELFT templates anymore.
>
> Modified:
> lld/trunk/ELF/LinkerScript.cpp
> lld/trunk/ELF/OutputSections.cpp
> lld/trunk/ELF/OutputSections.h
> lld/trunk/ELF/Writer.cpp
>
> Modified: lld/trunk/ELF/LinkerScript.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=297720&r1=297719&r2=297720&view=diff
> ==============================================================================
> --- lld/trunk/ELF/LinkerScript.cpp (original)
> +++ lld/trunk/ELF/LinkerScript.cpp Tue Mar 14 04:30:25 2017
> @@ -375,7 +375,7 @@ void LinkerScript<ELFT>::processCommands
>
> // Add input sections to an output section.
> for (InputSectionBase *S : V)
> - Factory.addInputSec<ELFT>(S, Cmd->Name);
> + Factory.addInputSec(S, Cmd->Name);
> }
> }
> CurOutSec = nullptr;
> @@ -386,7 +386,7 @@ template <class ELFT>
> void LinkerScript<ELFT>::addOrphanSections(OutputSectionFactory &Factory) {
> for (InputSectionBase *S : InputSections)
> if (S->Live && !S->OutSec)
> - Factory.addInputSec<ELFT>(S, getOutputSectionName(S->Name));
> + Factory.addInputSec(S, getOutputSectionName(S->Name));
> }
>
> template <class ELFT> static bool isTbss(OutputSection *Sec) {
>
> Modified: lld/trunk/ELF/OutputSections.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=297720&r1=297719&r2=297720&view=diff
> ==============================================================================
> --- lld/trunk/ELF/OutputSections.cpp (original)
> +++ lld/trunk/ELF/OutputSections.cpp Tue Mar 14 04:30:25 2017
> @@ -334,7 +334,6 @@ static void reportDiscarded(InputSection
> IS->File->getName());
> }
>
> -template <class ELFT>
> void OutputSectionFactory::addInputSec(InputSectionBase *IS,
> StringRef OutsecName) {
> if (!IS->Live) {
> @@ -414,13 +413,5 @@ template void OutputSection::writeTo<ELF
> template void OutputSection::writeTo<ELF64LE>(uint8_t *Buf);
> template void OutputSection::writeTo<ELF64BE>(uint8_t *Buf);
>
> -template void OutputSectionFactory::addInputSec<ELF32LE>(InputSectionBase *,
> - StringRef);
> -template void OutputSectionFactory::addInputSec<ELF32BE>(InputSectionBase *,
> - StringRef);
> -template void OutputSectionFactory::addInputSec<ELF64LE>(InputSectionBase *,
> - StringRef);
> -template void OutputSectionFactory::addInputSec<ELF64BE>(InputSectionBase *,
> - StringRef);
> }
> }
>
> Modified: lld/trunk/ELF/OutputSections.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=297720&r1=297719&r2=297720&view=diff
> ==============================================================================
> --- lld/trunk/ELF/OutputSections.h (original)
> +++ lld/trunk/ELF/OutputSections.h Tue Mar 14 04:30:25 2017
> @@ -136,7 +136,6 @@ public:
> OutputSectionFactory(std::vector<OutputSection *> &OutputSections);
> ~OutputSectionFactory();
>
> - template <class ELFT>
> void addInputSec(InputSectionBase *IS, StringRef OutsecName);
>
> private:
>
> Modified: lld/trunk/ELF/Writer.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=297720&r1=297719&r2=297720&view=diff
> ==============================================================================
> --- lld/trunk/ELF/Writer.cpp (original)
> +++ lld/trunk/ELF/Writer.cpp Tue Mar 14 04:30:25 2017
> @@ -937,7 +937,7 @@ void Writer<ELFT>::forEachRelSec(std::fu
> template <class ELFT> void Writer<ELFT>::createSections() {
> for (InputSectionBase *IS : InputSections)
> if (IS)
> - Factory.addInputSec<ELFT>(IS, getOutputSectionName(IS->Name));
> + Factory.addInputSec(IS, getOutputSectionName(IS->Name));
>
> sortBySymbolsOrder<ELFT>(OutputSections);
> sortInitFini<ELFT>(findSection(".init_array"));
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list