mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Do not disambiguate 'GlobalModuleDependenciesCache' by search path set
This is no longer necessary since the cache is always configured for the current scanning context hash, which includes the search path set.
This commit is contained in:
@@ -120,7 +120,8 @@ DependencyScanningTool::getDependencies(
|
||||
|
||||
// Local scan cache instance, wrapping the shared global cache.
|
||||
ModuleDependenciesCache cache(*SharedCache,
|
||||
Instance->getMainModule()->getNameStr());
|
||||
Instance->getMainModule()->getNameStr().str(),
|
||||
Instance->getInvocation().getModuleScanningHash());
|
||||
// Execute the scanning action, retrieving the in-memory result
|
||||
auto DependenciesOrErr = performModuleScan(*Instance.get(), cache);
|
||||
if (DependenciesOrErr.getError())
|
||||
@@ -161,7 +162,8 @@ DependencyScanningTool::getDependencies(
|
||||
|
||||
// Local scan cache instance, wrapping the shared global cache.
|
||||
ModuleDependenciesCache cache(*SharedCache,
|
||||
Instance->getMainModule()->getNameStr());
|
||||
Instance->getMainModule()->getNameStr().str(),
|
||||
Instance->getInvocation().getModuleScanningHash());
|
||||
auto BatchScanResults = performBatchModuleScan(
|
||||
*Instance.get(), cache, VersionedPCMInstanceCacheCache.get(),
|
||||
Saver, BatchInput);
|
||||
@@ -205,8 +207,6 @@ DependencyScanningTool::initScannerForAction(
|
||||
auto instanceOrErr = initCompilerInstanceForScan(Command);
|
||||
if (instanceOrErr.getError())
|
||||
return instanceOrErr;
|
||||
SharedCache->configureForContextHash((*instanceOrErr)->getInvocation()
|
||||
.getModuleScanningHash());
|
||||
return instanceOrErr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user