[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 6 12:19:32 PST 2025


================
@@ -95,6 +96,10 @@ class DependencyScanningService {
     return SharedCache;
   }
 
+  ModuleCacheMutexes &getSharedModuleCacheMutexes() {
----------------
jansvoboda11 wrote:

We don't _need_ it, but we currently call `std::make_shared<ModuleCacheMutexLock>` for each TU, which is unnecessary. We could just do that on service construction and avoid future allocations.

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


More information about the cfe-commits mailing list