[PATCH] D94845: [llvm] Don't disable fallthrough for strictly virtual working directory.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 16:23:31 PST 2021
JDevlieghere created this revision.
JDevlieghere added a reviewer: dexonsmith.
Herald added a subscriber: hiraditya.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Alterantive to D94811 <https://reviews.llvm.org/D94811>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94845
Files:
llvm/include/llvm/Support/VirtualFileSystem.h
llvm/lib/Support/VirtualFileSystem.cpp
Index: llvm/lib/Support/VirtualFileSystem.cpp
===================================================================
--- llvm/lib/Support/VirtualFileSystem.cpp
+++ llvm/lib/Support/VirtualFileSystem.cpp
@@ -1016,7 +1016,6 @@
if (auto ExternalWorkingDirectory =
ExternalFS->getCurrentWorkingDirectory()) {
WorkingDirectory = *ExternalWorkingDirectory;
- ExternalFSValidWD = true;
}
}
@@ -1076,10 +1075,8 @@
return errc::no_such_file_or_directory;
// Always change the external FS but ignore its result.
- if (ExternalFS) {
- auto EC = ExternalFS->setCurrentWorkingDirectory(Path);
- ExternalFSValidWD = !static_cast<bool>(EC);
- }
+ if (ExternalFS)
+ ExternalFS->setCurrentWorkingDirectory(Path);
SmallString<128> AbsolutePath;
Path.toVector(AbsolutePath);
Index: llvm/include/llvm/Support/VirtualFileSystem.h
===================================================================
--- llvm/include/llvm/Support/VirtualFileSystem.h
+++ llvm/include/llvm/Support/VirtualFileSystem.h
@@ -652,7 +652,7 @@
friend class RedirectingFileSystemParser;
bool shouldUseExternalFS() const {
- return ExternalFSValidWD && IsFallthrough;
+ return IsFallthrough;
}
// In a RedirectingFileSystem, keys can be specified in Posix or Windows
@@ -672,9 +672,6 @@
/// The current working directory of the file system.
std::string WorkingDirectory;
- /// Whether the current working directory is valid for the external FS.
- bool ExternalFSValidWD = false;
-
/// The file system to use for external references.
IntrusiveRefCntPtr<FileSystem> ExternalFS;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94845.317107.patch
Type: text/x-patch
Size: 1632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210116/1641b6e7/attachment.bin>
More information about the llvm-commits
mailing list