File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -998,7 +998,7 @@ class SwiftDependencyScanningService {
998
998
std::vector<std::string> AllContextHashes;
999
999
1000
1000
// / Shared state mutual-exclusivity lock
1001
- llvm::sys::SmartMutex<true > ScanningServiceGlobalLock;
1001
+ mutable llvm::sys::SmartMutex<true > ScanningServiceGlobalLock;
1002
1002
1003
1003
// / Retrieve the dependencies map that corresponds to the given dependency
1004
1004
// / kind.
Original file line number Diff line number Diff line change @@ -736,6 +736,7 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
736
736
737
737
SwiftDependencyScanningService::ContextSpecificGlobalCacheState *
738
738
SwiftDependencyScanningService::getCacheForScanningContextHash (StringRef scanningContextHash) const {
739
+ llvm::sys::SmartScopedLock<true > Lock (ScanningServiceGlobalLock);
739
740
auto contextSpecificCache = ContextSpecificCacheMap.find (scanningContextHash);
740
741
assert (contextSpecificCache != ContextSpecificCacheMap.end () &&
741
742
" Global Module Dependencies Cache not configured with context-specific "
@@ -756,7 +757,6 @@ SwiftDependencyScanningService::getDependenciesMap(
756
757
ModuleNameToDependencyMap &
757
758
SwiftDependencyScanningService::getDependenciesMap (
758
759
ModuleDependencyKind kind, StringRef scanContextHash) {
759
- llvm::sys::SmartScopedLock<true > Lock (ScanningServiceGlobalLock);
760
760
auto contextSpecificCache = getCacheForScanningContextHash (scanContextHash);
761
761
auto it = contextSpecificCache->ModuleDependenciesMap .find (kind);
762
762
assert (it != contextSpecificCache->ModuleDependenciesMap .end () &&
You can’t perform that action at this time.
0 commit comments