commit | ea63a2836406901d4eca832288239c9b3471ce1d | [log] [tgz] |
---|---|---|
author | Rui Ueyama <ruiu@google.com> | Thu Jun 18 20:16:26 2015 +0000 |
committer | Rui Ueyama <ruiu@google.com> | Thu Jun 18 20:16:26 2015 +0000 |
tree | 58111a8d33336ef66c2333ed3f9b045de3c3a10d | |
parent | 4bde6c2674931fde48f27367c02fbeaf3c7fa1b0 [diff] [blame] |
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);