Skip to content

Commit a5cff6a

Browse files
bnbarhamkeith
authored andcommitted
[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 e765e0b commit a5cff6a

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
@@ -902,6 +902,10 @@ class RedirectingFileSystem : public vfs::FileSystem {
902902

903903
StringRef getExternalContentsPrefixDir() const;
904904

905+
/// Sets the redirection kind to \c Fallthrough if true or \c RedirectOnly
906+
/// otherwise. Will removed in the future, use \c setRedirection instead.
907+
void setFallthrough(bool Fallthrough);
908+
905909
void setRedirection(RedirectingFileSystem::RedirectKind Kind);
906910

907911
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
@@ -1363,6 +1363,14 @@ StringRef RedirectingFileSystem::getExternalContentsPrefixDir() const {
13631363
return ExternalContentsPrefixDir;
13641364
}
13651365

1366+
void RedirectingFileSystem::setFallthrough(bool Fallthrough) {
1367+
if (Fallthrough) {
1368+
Redirection = RedirectingFileSystem::RedirectKind::Fallthrough;
1369+
} else {
1370+
Redirection = RedirectingFileSystem::RedirectKind::RedirectOnly;
1371+
}
1372+
}
1373+
13661374
void RedirectingFileSystem::setRedirection(
13671375
RedirectingFileSystem::RedirectKind Kind) {
13681376
Redirection = Kind;

0 commit comments

Comments
 (0)