COFF: Fix the order of the DLL import entry.

There are some DLLs whose initializers depends on other DLLs'
initializers. The initialization order matters for them.

MSVC linker uses the order of the libraries from the command line.
LLD used ASCII-betical order. So they were incompatible.
This patch makes LLD compatible with MSVC.

llvm-svn: 245201
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index 871c40c..1113c5e 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -281,7 +281,8 @@
   // Read names and create an __imp_ symbol.
   StringRef Name = StringAlloc.save(StringRef(Buf + sizeof(*Hdr)));
   StringRef ImpName = StringAlloc.save(Twine("__imp_") + Name);
-  StringRef DLLName(Buf + sizeof(coff_import_header) + Name.size() + 1);
+  const char *NameStart = Buf + sizeof(coff_import_header) + Name.size() + 1;
+  DLLName = StringRef(NameStart).lower();
   StringRef ExtName;
   switch (Hdr->getNameType()) {
   case IMPORT_ORDINAL: