diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-24 19:17:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-19 21:24:44 +0000 |
commit | ab50317e96e57dee5b3ff4ad3f16f205b2a3359e (patch) | |
tree | 4b1f388eb6a07e574417aaacecd3ec4a83550718 /contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 412542983a5ba62902141a8a7e155cceb9196a66 (diff) |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp b/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp index 367e794d38f6..c43b70e239e0 100644 --- a/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp +++ b/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp @@ -325,14 +325,14 @@ RealFileSystem::openFileForRead(const Twine &Name) { llvm::ErrorOr<std::string> RealFileSystem::getCurrentWorkingDirectory() const { if (WD && *WD) - return std::string(WD->get().Specified.str()); + return std::string(WD->get().Specified); if (WD) return WD->getError(); SmallString<128> Dir; if (std::error_code EC = llvm::sys::fs::current_path(Dir)) return EC; - return std::string(Dir.str()); + return std::string(Dir); } std::error_code RealFileSystem::setCurrentWorkingDirectory(const Twine &Path) { @@ -1091,7 +1091,7 @@ class InMemoryFileSystem::DirIterator : public llvm::vfs::detail::DirIterImpl { } break; } - CurrentEntry = directory_entry(std::string(Path.str()), Type); + CurrentEntry = directory_entry(std::string(Path), Type); } else { // When we're at the end, make CurrentEntry invalid and DirIterImpl will // do the rest. @@ -1146,7 +1146,7 @@ std::error_code InMemoryFileSystem::setCurrentWorkingDirectory(const Twine &P) { llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); if (!Path.empty()) - WorkingDirectory = std::string(Path.str()); + WorkingDirectory = std::string(Path); return {}; } @@ -1252,7 +1252,7 @@ class llvm::vfs::RedirectingFSDirIterImpl Type = sys::fs::file_type::regular_file; break; } - CurrentEntry = directory_entry(std::string(PathStr.str()), Type); + CurrentEntry = directory_entry(std::string(PathStr), Type); } else { CurrentEntry = directory_entry(); } @@ -1328,7 +1328,7 @@ RedirectingFileSystem::setCurrentWorkingDirectory(const Twine &Path) { Path.toVector(AbsolutePath); if (std::error_code EC = makeAbsolute(AbsolutePath)) return EC; - WorkingDirectory = std::string(AbsolutePath.str()); + WorkingDirectory = std::string(AbsolutePath); return {}; } |