[lld] r240042 - COFF: Handle both / and \ as path separator.
Rui Ueyama
ruiu at google.com
Thu Jun 18 13:16:26 PDT 2015
Author: ruiu
Date: Thu Jun 18 15:16:26 2015
New Revision: 240042
URL: http://llvm.org/viewvc/llvm-project?rev=240042&view=rev
Log:
COFF: Handle both / and \ as path separator.
Modified:
lld/trunk/COFF/InputFiles.cpp
Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=240042&r1=240041&r2=240042&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Thu Jun 18 15:16:26 2015
@@ -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);
More information about the llvm-commits
mailing list