[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:
Artem Chikin
2022-12-05 15:02:25 -08:00
parent 990b95e9d8
commit f39c6385df
8 changed files with 193 additions and 374 deletions

View File

@@ -167,20 +167,16 @@ Optional<ModuleDependencies> SerializedModuleLoaderBase::getModuleDependencies(
// Check whether we've cached this result.
if (auto found = cache.findDependencies(
moduleName,
{ModuleDependenciesKind::SwiftInterface, currentSearchPathSet}))
moduleName, ModuleDependenciesKind::SwiftInterface))
return found;
if (auto found = cache.findDependencies(
moduleName,
{ModuleDependenciesKind::SwiftSource, currentSearchPathSet}))
moduleName, ModuleDependenciesKind::SwiftSource))
return found;
if (auto found = cache.findDependencies(
moduleName,
{ModuleDependenciesKind::SwiftBinary, currentSearchPathSet}))
moduleName, ModuleDependenciesKind::SwiftBinary))
return found;
if (auto found = cache.findDependencies(
moduleName,
{ModuleDependenciesKind::SwiftPlaceholder, currentSearchPathSet}))
moduleName, ModuleDependenciesKind::SwiftPlaceholder))
return found;
ImportPath::Module::Builder builder(Ctx, moduleName, /*separator=*/'.');