diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
| commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
| tree | 1d56ae694a6de602e348dd80165cf881a36600ed /lldb/source/Utility/FileSpec.cpp | |
| parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
Diffstat (limited to 'lldb/source/Utility/FileSpec.cpp')
| -rw-r--r-- | lldb/source/Utility/FileSpec.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp index 24f8c2b1c23f..c0dbc29bcd1f 100644 --- a/lldb/source/Utility/FileSpec.cpp +++ b/lldb/source/Utility/FileSpec.cpp @@ -311,7 +311,8 @@ llvm::Optional<FileSpec::Style> FileSpec::GuessPathStyle(llvm::StringRef absolut if (absolute_path.startswith(R"(\\)")) return Style::windows; if (absolute_path.size() >= 3 && llvm::isAlpha(absolute_path[0]) && - absolute_path.substr(1, 2) == R"(:\)") + (absolute_path.substr(1, 2) == R"(:\)" || + absolute_path.substr(1, 2) == R"(:/)")) return Style::windows; return llvm::None; } @@ -356,7 +357,7 @@ size_t FileSpec::GetPath(char *path, size_t path_max_len, std::string FileSpec::GetPath(bool denormalize) const { llvm::SmallString<64> result; GetPath(result, denormalize); - return std::string(result.begin(), result.end()); + return static_cast<std::string>(result); } const char *FileSpec::GetCString(bool denormalize) const { |
