[PATCH] D146328: [clang][deps] Only cache files with specific extension
Michael Spencer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 17 15:45:31 PDT 2023
Bigcheese added inline comments.
================
Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:272-291
+enum class Enable { Yes, No };
+enum class ScanFile { Yes, No };
+enum class CacheStatFailure { Yes, No };
+
+struct PathPolicy {
+ unsigned Enable : 1; // Implies caching of all open and stat results.
+ unsigned ScanFile : 1;
----------------
Alternative that gets rid of the asserts as you just can't construct it incorrectly. I didn't compile this locally, but this should make it so you can't use `{}` to construct one externally, and you either use:
`PathPolicy::cache(ScanFile::Yes, CacheStatFailure::No)` or
`PathPolicy::bypassCache()`
when constructing them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146328/new/
https://reviews.llvm.org/D146328
More information about the cfe-commits
mailing list