Author: Jan Svoboda Date: 2022-12-15T16:03:00-08:00 New Revision: 64435396c5a0ba33a1197915673c1071e6d64f25
URL: https://github.com/llvm/llvm-project/commit/64435396c5a0ba33a1197915673c1071e6d64f25 DIFF: https://github.com/llvm/llvm-project/commit/64435396c5a0ba33a1197915673c1071e6d64f25.diff LOG: [clang][deps] Implement `dump()` for the VFS Added: Modified: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h llvm/include/llvm/Support/VirtualFileSystem.h Removed: ################################################################################ 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<FileSystem> FS; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits