aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-12-18 20:30:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-04-06 20:11:55 +0000
commit5f757f3ff9144b609b3c433dfd370cc6bdc191ad (patch)
tree1b4e980b866cd26a00af34c0a653eb640bd09caf /contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp
parent3e1c8a35f741a5d114d0ba670b15191355711fe9 (diff)
parent312c0ed19cc5276a17bacf2120097bec4515b0f1 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp b/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp
index d381d79fba96..367e794d38f6 100644
--- a/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/VirtualFileSystem.cpp
@@ -489,7 +489,7 @@ void OverlayFileSystem::printImpl(raw_ostream &OS, PrintType Type,
if (Type == PrintType::Contents)
Type = PrintType::Summary;
- for (auto FS : overlays_range())
+ for (const auto &FS : overlays_range())
FS->print(OS, Type, IndentLevel + 1);
}
@@ -552,7 +552,7 @@ class CombiningDirIterImpl : public llvm::vfs::detail::DirIterImpl {
public:
CombiningDirIterImpl(ArrayRef<FileSystemPtr> FileSystems, std::string Dir,
std::error_code &EC) {
- for (auto FS : FileSystems) {
+ for (const auto &FS : FileSystems) {
std::error_code FEC;
directory_iterator Iter = FS->dir_begin(Dir, FEC);
if (FEC && FEC != errc::no_such_file_or_directory) {
@@ -1337,7 +1337,7 @@ std::error_code RedirectingFileSystem::isLocal(const Twine &Path_,
SmallString<256> Path;
Path_.toVector(Path);
- if (std::error_code EC = makeCanonical(Path))
+ if (makeCanonical(Path))
return {};
return ExternalFS->isLocal(Path, Result);
@@ -1385,7 +1385,7 @@ RedirectingFileSystem::makeAbsolute(StringRef WorkingDir,
std::string Result = std::string(WorkingDir);
StringRef Dir(Result);
- if (!Dir.endswith(sys::path::get_separator(style))) {
+ if (!Dir.ends_with(sys::path::get_separator(style))) {
Result += sys::path::get_separator(style);
}
// backslashes '\' are legit path charactors under POSIX. Windows APIs