COFF: Handle both / and \ as path separator.

llvm-svn: 240042
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index b0a13fb..6d084bb 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -32,7 +32,7 @@
 
 // Returns the last element of a path, which is supposed to be a filename.
 static StringRef getBasename(StringRef Path) {
-  size_t Pos = Path.rfind('\\');
+  size_t Pos = Path.find_last_of("\\/");
   if (Pos == StringRef::npos)
     return Path;
   return Path.substr(Pos + 1);