From ea63a2836406901d4eca832288239c9b3471ce1d Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 18 Jun 2015 20:16:26 +0000 Subject: [PATCH] COFF: Handle both / and \ as path separator. llvm-svn: 240042 --- lld/COFF/InputFiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ namespace coff { // 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); -- 2.7.4