Make dummySectionsNum() to be not a member of writer. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 1 Apr 2016 11:59:32 +0000 (11:59 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 1 Apr 2016 11:59:32 +0000 (11:59 +0000)
llvm-svn: 265136

lld/ELF/Writer.cpp

index e8fbf08..9525bdc 100644 (file)
@@ -107,9 +107,6 @@ private:
   unsigned getNumSections() const {
     return OutputSections.size() + 1 - dummySectionsNum();
   }
-  // Usually there are 2 dummies sections: ELF header and program header.
-  // Relocatable output does not require program headers to be created.
-  unsigned dummySectionsNum() const { return Config->Relocatable ? 1 : 2; }
 
   void addRelIpltSymbols();
   void addStartEndSymbols();
@@ -127,6 +124,10 @@ private:
 };
 } // anonymous namespace
 
+// Usually there are 2 dummies sections: ELF header and program header.
+// Relocatable output does not require program headers to be created.
+unsigned dummySectionsNum() { return Config->Relocatable ? 1 : 2; }
+
 template <class ELFT> void elf::writeResult(SymbolTable<ELFT> *Symtab) {
   typedef typename ELFT::uint uintX_t;