COFF: Handle both / and \ as path separator.

llvm-svn: 240042
This commit is contained in:
Rui Ueyama 2015-06-18 20:16:26 +00:00
parent 4bde6c2674
commit ea63a28364
1 changed files with 1 additions and 1 deletions

View File

@ -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);