diff --git a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h index 0143a40da7378..efff3498b4ee0 100644 --- a/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h +++ b/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h @@ -376,6 +376,13 @@ class DependencyScanningWorkerFilesystem : public llvm::vfs::ProxyFileSystem { .getOrInsertEntryForFilename(Filename, Entry); } + void printImpl(raw_ostream &OS, PrintType Type, + unsigned IndentLevel) const override { + printIndent(OS, IndentLevel); + OS << "DependencyScanningFilesystem\n"; + getUnderlyingFS().print(OS, Type, IndentLevel + 1); + } + /// The global cache shared between worker threads. DependencyScanningFilesystemSharedCache &SharedCache; /// The local cache is used by the worker thread to cache file system queries diff --git a/llvm/include/llvm/Support/VirtualFileSystem.h b/llvm/include/llvm/Support/VirtualFileSystem.h index 7ae8d70344f6a..a2ce22ebd5af8 100644 --- a/llvm/include/llvm/Support/VirtualFileSystem.h +++ b/llvm/include/llvm/Support/VirtualFileSystem.h @@ -450,7 +450,7 @@ class ProxyFileSystem : public FileSystem { } protected: - FileSystem &getUnderlyingFS() { return *FS; } + FileSystem &getUnderlyingFS() const { return *FS; } private: IntrusiveRefCntPtr FS;