[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.
This commit is contained in:
Ben Barham 2022-02-03 13:35:16 -08:00 committed by Keith Smiley
parent e765e0bc8e
commit a5cff6af1d
2 changed files with 12 additions and 0 deletions

View File

@ -902,6 +902,10 @@ public:
StringRef getExternalContentsPrefixDir() const;
/// Sets the redirection kind to \c Fallthrough if true or \c RedirectOnly
/// otherwise. Will removed in the future, use \c setRedirection instead.
void setFallthrough(bool Fallthrough);
void setRedirection(RedirectingFileSystem::RedirectKind Kind);
std::vector<llvm::StringRef> getRoots() const;

View File

@ -1363,6 +1363,14 @@ StringRef RedirectingFileSystem::getExternalContentsPrefixDir() const {
return ExternalContentsPrefixDir;
}
void RedirectingFileSystem::setFallthrough(bool Fallthrough) {
if (Fallthrough) {
Redirection = RedirectingFileSystem::RedirectKind::Fallthrough;
} else {
Redirection = RedirectingFileSystem::RedirectKind::RedirectOnly;
}
}
void RedirectingFileSystem::setRedirection(
RedirectingFileSystem::RedirectKind Kind) {
Redirection = Kind;