File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
clang/lib/Tooling/DependencyScanning Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class InProcessModuleCache : public ModuleCache {
6666
6767 std::unique_ptr<llvm::AdvisoryLock> getLock (StringRef Filename) override {
6868 auto &CompilationMutex = [&]() -> std::shared_mutex & {
69- std::lock_guard Lock (Entries.Mutex );
69+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
7070 auto &Entry = Entries.Map [Filename];
7171 if (!Entry)
7272 Entry = std::make_unique<ModuleCacheEntry>();
@@ -77,7 +77,7 @@ class InProcessModuleCache : public ModuleCache {
7777
7878 std::time_t getModuleTimestamp (StringRef Filename) override {
7979 auto &Timestamp = [&]() -> std::atomic<std::time_t > & {
80- std::lock_guard Lock (Entries.Mutex );
80+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
8181 auto &Entry = Entries.Map [Filename];
8282 if (!Entry)
8383 Entry = std::make_unique<ModuleCacheEntry>();
@@ -90,7 +90,7 @@ class InProcessModuleCache : public ModuleCache {
9090 void updateModuleTimestamp (StringRef Filename) override {
9191 // Note: This essentially replaces FS contention with mutex contention.
9292 auto &Timestamp = [&]() -> std::atomic<std::time_t > & {
93- std::lock_guard Lock (Entries.Mutex );
93+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
9494 auto &Entry = Entries.Map [Filename];
9595 if (!Entry)
9696 Entry = std::make_unique<ModuleCacheEntry>();
You can’t perform that action at this time.
0 commit comments