Bigcheese updated this revision to Diff 503164.
Bigcheese added a comment.
Also handle `module.map`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145526/new/
https://reviews.llvm.org/D145526
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
@@ -181,7 +181,11 @@
StringRef Ext = llvm::sys::path::extension(Filename);
if (Ext.empty())
return false; // This may be the module cache directory.
- // Only cache stat failures on source files.
+ // Only cache stat failures on files that are not expected to change during
+ // the build.
+ StringRef FName = llvm::sys::path::filename(Filename);
+ if (FName == "module.modulemap" || FName == "module.map")
+ return true;
return shouldScanForDirectivesBasedOnExtension(Filename);
}
Index: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
===================================================================
--- clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
+++ clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
@@ -181,7 +181,11 @@
StringRef Ext = llvm::sys::path::extension(Filename);
if (Ext.empty())
return false; // This may be the module cache directory.
- // Only cache stat failures on source files.
+ // Only cache stat failures on files that are not expected to change during
+ // the build.
+ StringRef FName = llvm::sys::path::filename(Filename);
+ if (FName == "module.modulemap" || FName == "module.map")
+ return true;
return shouldScanForDirectivesBasedOnExtension(Filename);
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits