[PATCH] D147002: [clang][deps] Don't cache stat failures for .framework directories

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 14:21:13 PDT 2023


jansvoboda11 created this revision.
jansvoboda11 added a reviewer: Bigcheese.
Herald added a subscriber: ributzka.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The .framework directory might be created during the course of the build. Some scanning worker finding out it
doesn't exist yet at the start shouldn't make it impossible for subsequent workers to see it when it evetually gets
created.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147002

Files:
  clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp


Index: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
===================================================================
--- clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
+++ clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
@@ -169,8 +169,9 @@
       .CasesLower(".m", ".mm",                         PathPolicy::cache(ScanFile::Yes))
       .CasesLower(".i", ".ii", ".mi", ".mmi",          PathPolicy::cache(ScanFile::Yes))
       .CasesLower(".def", ".inc",                      PathPolicy::cache(ScanFile::Yes))
+      .CaseLower(".framework", PathPolicy::cache(ScanFile::No, CacheStatFailure::No))
       .CasesLower(".modulemap", ".map",      PathPolicy::cache(ScanFile::No))
-      .CasesLower(".framework", ".apinotes", PathPolicy::cache(ScanFile::No))
+      .CaseLower(".apinotes",                PathPolicy::cache(ScanFile::No))
       .CasesLower(".yaml", ".json", ".hmap", PathPolicy::cache(ScanFile::No))
       .Default(PathPolicy::fallThrough());
   // clang-format on


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147002.508795.patch
Type: text/x-patch
Size: 1052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230327/66a06365/attachment.bin>


More information about the cfe-commits mailing list