Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2025-09-23 15:58:43 -07:00
3 changed files with 27 additions and 1 deletions

View File

@@ -1456,7 +1456,7 @@ void ModuleDependencyScanner::resolveSwiftOverlayDependenciesForModule(
// A scanning task to query a Swift module by-name. If the module already
// exists in the cache, do nothing and return.
auto scanForSwiftDependency = [this, &cache, &lookupResultLock,
auto scanForSwiftDependency = [this, &moduleID, &cache, &lookupResultLock,
&swiftOverlayLookupResult](
Identifier moduleIdentifier) {
auto moduleName = moduleIdentifier.str();
@@ -1467,6 +1467,13 @@ void ModuleDependencyScanner::resolveSwiftOverlayDependenciesForModule(
return;
}
// Avoid Swift overlay lookup for the underlying clang module of a known
// Swift module. i.e. When computing set of Swift Overlay dependencies
// for module 'A', which depends on a Clang module 'A', ensure we don't
// lookup Swift module 'A' itself here.
if (moduleName == moduleID.ModuleName)
return;
auto moduleDependencies = withDependencyScanningWorker(
[moduleIdentifier](ModuleDependencyScanningWorker *ScanningWorker) {
return ScanningWorker->scanFilesystemForSwiftModuleDependency(