[ELF] - Cleanup MapFile.cpp. NFC.

* Removed redundant templating.
* Added missing `static` keyword.

llvm-svn: 309376
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index 8a92714..58ad4f3 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -39,17 +39,16 @@
     SymbolMapTy;
 
 // Print out the first three columns of a line.
-template <class ELFT>
 static void writeHeader(raw_ostream &OS, uint64_t Addr, uint64_t Size,
                         uint64_t Align) {
-  int W = ELFT::Is64Bits ? 16 : 8;
+  int W = Config->Is64 ? 16 : 8;
   OS << format("%0*llx %0*llx %5lld ", W, Addr, W, Size, Align);
 }
 
 static std::string indent(int Depth) { return std::string(Depth * 8, ' '); }
 
 // Returns a list of all symbols that we want to print out.
-template <class ELFT> std::vector<DefinedRegular *> getSymbols() {
+template <class ELFT> static std::vector<DefinedRegular *> getSymbols() {
   std::vector<DefinedRegular *> V;
   for (ObjFile<ELFT> *File : ObjFile<ELFT>::Instances)
     for (SymbolBody *B : File->getSymbols())
@@ -61,8 +60,7 @@
 }
 
 // Returns a map from sections to their symbols.
-template <class ELFT>
-SymbolMapTy getSectionSyms(ArrayRef<DefinedRegular *> Syms) {
+static SymbolMapTy getSectionSyms(ArrayRef<DefinedRegular *> Syms) {
   SymbolMapTy Ret;
   for (DefinedRegular *S : Syms)
     Ret[S->Section].push_back(S);
@@ -83,13 +81,12 @@
 // Demangling symbols (which is what toString() does) is slow, so
 // we do that in batch using parallel-for.
 template <class ELFT>
-DenseMap<DefinedRegular *, std::string>
+static DenseMap<DefinedRegular *, std::string>
 getSymbolStrings(ArrayRef<DefinedRegular *> Syms) {
   std::vector<std::string> Str(Syms.size());
   parallelForEachN(0, Syms.size(), [&](size_t I) {
     raw_string_ostream OS(Str[I]);
-    writeHeader<ELFT>(OS, Syms[I]->getVA(), Syms[I]->template getSize<ELFT>(),
-                      0);
+    writeHeader(OS, Syms[I]->getVA(), Syms[I]->template getSize<ELFT>(), 0);
     OS << indent(2) << toString(*Syms[I]);
   });
 
@@ -113,7 +110,7 @@
 
   // Collect symbol info that we want to print out.
   std::vector<DefinedRegular *> Syms = getSymbols<ELFT>();
-  SymbolMapTy SectionSyms = getSectionSyms<ELFT>(Syms);
+  SymbolMapTy SectionSyms = getSectionSyms(Syms);
   DenseMap<DefinedRegular *, std::string> SymStr = getSymbolStrings<ELFT>(Syms);
 
   // Print out the header line.
@@ -123,7 +120,7 @@
 
   // Print out file contents.
   for (OutputSection *OSec : OutputSections) {
-    writeHeader<ELFT>(OS, OSec->Addr, OSec->Size, OSec->Alignment);
+    writeHeader(OS, OSec->Addr, OSec->Size, OSec->Alignment);
     OS << OSec->Name << '\n';
 
     // Dump symbols for each input section.
@@ -132,8 +129,8 @@
       if (!ISD)
         continue;
       for (InputSection *IS : ISD->Sections) {
-        writeHeader<ELFT>(OS, OSec->Addr + IS->OutSecOff, IS->getSize(),
-                          IS->Alignment);
+        writeHeader(OS, OSec->Addr + IS->OutSecOff, IS->getSize(),
+                    IS->Alignment);
         OS << indent(1) << toString(IS) << '\n';
         for (DefinedRegular *Sym : SectionSyms[IS])
           OS << SymStr[Sym] << '\n';