Make dummySectionsNum() to be not a member of writer. NFC.

llvm-svn: 265136
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index e8fbf08..9525bdc 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -107,9 +107,6 @@
   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 @@
 };
 } // 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;