COFF: Cache Archive::Symbol::getName(). NFC.

getName() does strlen() on the symbol table, so it's not very fast.
It's not as bad as r239332 because the number of symbols exported
from archive files are fewer than object files, and they are usually
shorter, though.

llvm-svn: 240178
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index 1d4db89..4499395 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -61,10 +61,10 @@
   // Read the symbol table to construct Lazy objects.
   uint32_t I = 0;
   for (const Archive::Symbol &Sym : File->symbols()) {
+    auto *B = new (&Buf[I++]) Lazy(this, Sym);
     // Skip special symbol exists in import library files.
-    if (Sym.getName() == "__NULL_IMPORT_DESCRIPTOR")
-      continue;
-    SymbolBodies.push_back(new (&Buf[I++]) Lazy(this, Sym));
+    if (B->getName() != "__NULL_IMPORT_DESCRIPTOR")
+      SymbolBodies.push_back(B);
   }
   return std::error_code();
 }