Skip to content

Commit fdb2cf0

Browse files
authored
Merge pull request #11864 from swiftlang/cas-providing-vfs-print
[CAS] Implement missing APIs on CAS-providing VFS
2 parents 5273ef3 + 48d335d commit fdb2cf0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

llvm/lib/CAS/CASProvidingFileSystem.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ class CASProvidingFileSystem final : public CASBackedFileSystem {
6969
std::error_code isLocal(const Twine &Path, bool &Result) final {
7070
return FS->isLocal(Path, Result);
7171
}
72+
void visitChildFileSystems(VisitCallbackTy Callback) override {
73+
Callback(*FS);
74+
FS->visitChildFileSystems(Callback);
75+
}
76+
void printImpl(raw_ostream &OS, PrintType Type,
77+
unsigned IndentLevel) const override {
78+
printIndent(OS, IndentLevel);
79+
OS << "CASProvidingFilesystem\n";
80+
if (Type == PrintType::Summary)
81+
return;
82+
FS->print(OS, Type == PrintType::Contents ? PrintType::Summary : Type,
83+
IndentLevel + 1);
84+
}
7285

7386
llvm::Expected<std::unique_ptr<CASBackedFile>>
7487
openCASBackedFileForRead(const Twine &Path) final {

0 commit comments

Comments
 (0)