Skip to content

Commit 9b93b7d

Browse files
committed
[VFS] Add back setFallthrough for downstream users
This fixes lldb's build. We can remove this in the future if we want but for now this will be nicer to existing consumers.
1 parent e5a8572 commit 9b93b7d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

llvm/include/llvm/Support/VirtualFileSystem.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,10 @@ class RedirectingFileSystem : public vfs::FileSystem {
885885

886886
StringRef getExternalContentsPrefixDir() const;
887887

888+
/// Sets the redirection kind to \c Fallthrough if true or \c RedirectOnly
889+
/// otherwise. Will removed in the future, use \c setRedirection instead.
890+
void setFallthrough(bool Fallthrough);
891+
888892
void setRedirection(RedirectingFileSystem::RedirectKind Kind);
889893

890894
std::vector<llvm::StringRef> getRoots() const;

llvm/lib/Support/VirtualFileSystem.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,14 @@ StringRef RedirectingFileSystem::getExternalContentsPrefixDir() const {
13431343
return ExternalContentsPrefixDir;
13441344
}
13451345

1346+
void RedirectingFileSystem::setFallthrough(bool Fallthrough) {
1347+
if (Fallthrough) {
1348+
Redirection = RedirectingFileSystem::RedirectKind::Fallthrough;
1349+
} else {
1350+
Redirection = RedirectingFileSystem::RedirectKind::RedirectOnly;
1351+
}
1352+
}
1353+
13461354
void RedirectingFileSystem::setRedirection(
13471355
RedirectingFileSystem::RedirectKind Kind) {
13481356
Redirection = Kind;

0 commit comments

Comments
 (0)