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 {
998998 std::vector<std::string> AllContextHashes;
999999
10001000 // / Shared state mutual-exclusivity lock
1001- llvm::sys::SmartMutex<true > ScanningServiceGlobalLock;
1001+ mutable llvm::sys::SmartMutex<true > ScanningServiceGlobalLock;
10021002
10031003 // / Retrieve the dependencies map that corresponds to the given dependency
10041004 // / kind.
Original file line number Diff line number Diff line change @@ -736,6 +736,7 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
736736
737737SwiftDependencyScanningService::ContextSpecificGlobalCacheState *
738738SwiftDependencyScanningService::getCacheForScanningContextHash (StringRef scanningContextHash) const {
739+ llvm::sys::SmartScopedLock<true > Lock (ScanningServiceGlobalLock);
739740 auto contextSpecificCache = ContextSpecificCacheMap.find (scanningContextHash);
740741 assert (contextSpecificCache != ContextSpecificCacheMap.end () &&
741742 " Global Module Dependencies Cache not configured with context-specific "
@@ -756,7 +757,6 @@ SwiftDependencyScanningService::getDependenciesMap(
756757ModuleNameToDependencyMap &
757758SwiftDependencyScanningService::getDependenciesMap (
758759 ModuleDependencyKind kind, StringRef scanContextHash) {
759- llvm::sys::SmartScopedLock<true > Lock (ScanningServiceGlobalLock);
760760 auto contextSpecificCache = getCacheForScanningContextHash (scanContextHash);
761761 auto it = contextSpecificCache->ModuleDependenciesMap .find (kind);
762762 assert (it != contextSpecificCache->ModuleDependenciesMap .end () &&
You can’t perform that action at this time.
0 commit comments