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 {
66
66
67
67
std::unique_ptr<llvm::AdvisoryLock> getLock (StringRef Filename) override {
68
68
auto &CompilationMutex = [&]() -> std::shared_mutex & {
69
- std::lock_guard Lock (Entries.Mutex );
69
+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
70
70
auto &Entry = Entries.Map [Filename];
71
71
if (!Entry)
72
72
Entry = std::make_unique<ModuleCacheEntry>();
@@ -77,7 +77,7 @@ class InProcessModuleCache : public ModuleCache {
77
77
78
78
std::time_t getModuleTimestamp (StringRef Filename) override {
79
79
auto &Timestamp = [&]() -> std::atomic<std::time_t > & {
80
- std::lock_guard Lock (Entries.Mutex );
80
+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
81
81
auto &Entry = Entries.Map [Filename];
82
82
if (!Entry)
83
83
Entry = std::make_unique<ModuleCacheEntry>();
@@ -90,7 +90,7 @@ class InProcessModuleCache : public ModuleCache {
90
90
void updateModuleTimestamp (StringRef Filename) override {
91
91
// Note: This essentially replaces FS contention with mutex contention.
92
92
auto &Timestamp = [&]() -> std::atomic<std::time_t > & {
93
- std::lock_guard Lock (Entries.Mutex );
93
+ std::lock_guard<std::mutex> Lock (Entries.Mutex );
94
94
auto &Entry = Entries.Map [Filename];
95
95
if (!Entry)
96
96
Entry = std::make_unique<ModuleCacheEntry>();
You can’t perform that action at this time.
0 commit comments