diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/Path.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/Path.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/Path.cpp b/contrib/llvm-project/llvm/lib/Support/Path.cpp index c2456dcac097..c8de2c0625aa 100644 --- a/contrib/llvm-project/llvm/lib/Support/Path.cpp +++ b/contrib/llvm-project/llvm/lib/Support/Path.cpp @@ -104,7 +104,7 @@ namespace { if (is_style_windows(style)) { if (pos == StringRef::npos) - pos = str.find_last_of(':', str.size() - 2); + pos = str.find_last_of(':', str.size() - 1); } if (pos == StringRef::npos || (pos == 1 && is_separator(str[0], style))) @@ -1145,7 +1145,7 @@ void directory_entry::replace_filename(const Twine &Filename, file_type Type, basic_file_status Status) { SmallString<128> PathStr = path::parent_path(Path); path::append(PathStr, Filename); - this->Path = std::string(PathStr.str()); + this->Path = std::string(PathStr); this->Type = Type; this->Status = Status; } |