[lld] r296466 - [ELF] - Remove ElfSym::EhdrStart member. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 02:34:56 PST 2017


Author: grimar
Date: Tue Feb 28 04:34:56 2017
New Revision: 296466

URL: http://llvm.org/viewvc/llvm-project?rev=296466&view=rev
Log:
[ELF] - Remove ElfSym::EhdrStart member. NFC.

We do not use it later, so don't have to store.

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

Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=296466&r1=296465&r2=296466&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Tue Feb 28 04:34:56 2017
@@ -338,9 +338,6 @@ public:
 // Some linker-generated symbols need to be created as
 // DefinedRegular symbols.
 template <class ELFT> struct ElfSym {
-  // The content for __ehdr_start symbol.
-  static DefinedSynthetic *EhdrStart;
-
   // The content for _etext and etext symbols.
   static DefinedSynthetic *Etext;
   static DefinedSynthetic *Etext2;
@@ -359,7 +356,6 @@ template <class ELFT> struct ElfSym {
   static DefinedRegular<ELFT> *MipsGp;
 };
 
-template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::EhdrStart;
 template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Etext;
 template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Etext2;
 template <class ELFT> DefinedSynthetic *ElfSym<ELFT>::Edata;

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=296466&r1=296465&r2=296466&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Feb 28 04:34:56 2017
@@ -837,8 +837,7 @@ template <class ELFT> void Writer<ELFT>:
     return;
 
   // __ehdr_start is the location of ELF file headers.
-  ElfSym<ELFT>::EhdrStart =
-      addOptionalSynthetic<ELFT>("__ehdr_start", Out::ElfHeader, 0);
+  addOptionalSynthetic<ELFT>("__ehdr_start", Out::ElfHeader, 0);
 
   auto Define = [](StringRef S, DefinedSynthetic *&Sym1,
                    DefinedSynthetic *&Sym2) {




More information about the llvm-commits mailing list