[lld] r291113 - Move code to the .cpp file. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 06:52:46 PST 2017


Author: rafael
Date: Thu Jan  5 08:52:46 2017
New Revision: 291113

URL: http://llvm.org/viewvc/llvm-project?rev=291113&view=rev
Log:
Move code to the .cpp file. NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=291113&r1=291112&r2=291113&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Thu Jan  5 08:52:46 2017
@@ -534,6 +534,16 @@ static typename ELFT::uint getOutFlags(I
   return S->Flags & ~SHF_GROUP & ~SHF_COMPRESSED;
 }
 
+namespace llvm {
+template <> struct DenseMapInfo<lld::elf::SectionKey> {
+  static lld::elf::SectionKey getEmptyKey();
+  static lld::elf::SectionKey getTombstoneKey();
+  static unsigned getHashValue(const lld::elf::SectionKey &Val);
+  static bool isEqual(const lld::elf::SectionKey &LHS,
+                      const lld::elf::SectionKey &RHS);
+};
+}
+
 template <class ELFT>
 static SectionKey createKey(InputSectionBase<ELFT> *C, StringRef OutsecName) {
   //  The ELF spec just says
@@ -600,6 +610,10 @@ static SectionKey createKey(InputSection
   return SectionKey{OutsecName, Flags, Alignment};
 }
 
+template <class ELFT> OutputSectionFactory<ELFT>::OutputSectionFactory() {}
+
+template <class ELFT> OutputSectionFactory<ELFT>::~OutputSectionFactory() {}
+
 template <class ELFT>
 std::pair<OutputSectionBase *, bool>
 OutputSectionFactory<ELFT>::create(InputSectionBase<ELFT> *C,

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=291113&r1=291112&r2=291113&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Thu Jan  5 08:52:46 2017
@@ -232,6 +232,8 @@ template <class ELFT> class OutputSectio
   typedef typename ELFT::uint uintX_t;
 
 public:
+  OutputSectionFactory();
+  ~OutputSectionFactory();
   std::pair<OutputSectionBase *, bool> create(InputSectionBase<ELFT> *C,
                                               StringRef OutsecName);
   std::pair<OutputSectionBase *, bool> create(const SectionKey &Key,
@@ -262,14 +264,5 @@ template <class ELFT> OutputSectionBase
 } // namespace elf
 } // namespace lld
 
-namespace llvm {
-template <> struct DenseMapInfo<lld::elf::SectionKey> {
-  static lld::elf::SectionKey getEmptyKey();
-  static lld::elf::SectionKey getTombstoneKey();
-  static unsigned getHashValue(const lld::elf::SectionKey &Val);
-  static bool isEqual(const lld::elf::SectionKey &LHS,
-                      const lld::elf::SectionKey &RHS);
-};
-}
 
 #endif




More information about the llvm-commits mailing list