[lld] r263375 - Move an OutputSectionBase member function to the top.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 22:50:33 PST 2016


Author: ruiu
Date: Sun Mar 13 00:50:33 2016
New Revision: 263375

URL: http://llvm.org/viewvc/llvm-project?rev=263375&view=rev
Log:
Move an OutputSectionBase member function to the top.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=263375&r1=263374&r2=263375&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Sun Mar 13 00:50:33 2016
@@ -48,6 +48,11 @@ OutputSectionBase<ELFT>::OutputSectionBa
 }
 
 template <class ELFT>
+void OutputSectionBase<ELFT>::writeHeaderTo(Elf_Shdr *Shdr) {
+  *Shdr = Header;
+}
+
+template <class ELFT>
 GotPltSection<ELFT>::GotPltSection()
     : OutputSectionBase<ELFT>(".got.plt", SHT_PROGBITS, SHF_ALLOC | SHF_WRITE) {
   this->Header.sh_addralign = sizeof(uintX_t);
@@ -290,11 +295,6 @@ InterpSection<ELFT>::InterpSection()
   this->Header.sh_addralign = 1;
 }
 
-template <class ELFT>
-void OutputSectionBase<ELFT>::writeHeaderTo(Elf_Shdr *SHdr) {
-  *SHdr = Header;
-}
-
 template <class ELFT> void InterpSection<ELFT>::writeTo(uint8_t *Buf) {
   memcpy(Buf, Config->DynamicLinker.data(), Config->DynamicLinker.size());
 }




More information about the llvm-commits mailing list