[clang] [llvm] [clang][deps] Add in-flight query caching to `DependencyScanningFilesystemSharedCache` (PR #199680)

Artem Chikin via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 03:28:48 PDT 2026


================
@@ -115,8 +115,12 @@ DependencyScanningFilesystemSharedCache::getOutOfDateEntries(
   for (unsigned i = 0; i < NumShards; i++) {
     const CacheShard &Shard = CacheShards[i];
     std::lock_guard<std::mutex> LockGuard(Shard.CacheLock);
-    for (const auto &[Path, CachedPair] : Shard.CacheByFilename) {
-      const CachedFileSystemEntry *Entry = CachedPair.first;
+    for (const auto &[Path, State] : Shard.CacheByFilename) {
+      const CachedFileSystemEntry *Entry = State.Entry;
+      // Cached state may carry only a real path or in-progress slot for a
+      // given filename; skip filenames whose entry has not been resolved.
----------------
artemcm wrote:

Reworded the comment. 

https://github.com/llvm/llvm-project/pull/199680


More information about the cfe-commits mailing list