[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)
Michael Spencer via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 18 15:55:00 PDT 2024
================
@@ -201,11 +201,8 @@ const CachedRealPath &DependencyScanningFilesystemSharedCache::CacheShard::
return *StoredRealPath;
}
-static bool shouldCacheStatFailures(StringRef Filename) {
- StringRef Ext = llvm::sys::path::extension(Filename);
- if (Ext.empty())
- return false; // This may be the module cache directory.
- return true;
+bool DependencyScanningWorkerFilesystem::shouldBypass(StringRef Path) const {
+ return BypassedPathPrefix && Path.starts_with(*BypassedPathPrefix);
----------------
Bigcheese wrote:
It doesn't canonicalize if it's already absolute, which is commonly the case for the module cache dir. If we're going to canonicalize on each access anyway, I think it's fine to canonicalize in CompilerInstance at the start.
https://github.com/llvm/llvm-project/pull/88800
More information about the cfe-commits
mailing list