[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 16 11:05:10 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);
----------------
jansvoboda11 wrote:
`ParseHeaderSearchArgs()` in `CompilerInvocation.cpp` already calls `llvm::sys::fs::make_absolute()` with either the process CWD or `-working-directory`, so the call to the same function in `HeaderSearch::getCachedModuleFileNameImpl()` seems to be redundant for Clang instances that were constructed from command line.
https://github.com/llvm/llvm-project/pull/88800
More information about the cfe-commits
mailing list