File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Sources/SwiftDriver/ExplicitModuleBuilds Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ private extension InterModuleDependencyGraph {
104
104
let mainModuleId : ModuleDependencyId = . swift( mainModuleName)
105
105
var pcmArgSetMap : [ ModuleDependencyId : Set < [ String ] > ] = [ : ]
106
106
107
+ var visitedSwiftModules : Set < ModuleDependencyId > = [ ]
108
+
107
109
func visit( _ moduleId: ModuleDependencyId ,
108
110
pathPCMArtSet: Set < [ String ] > ,
109
111
pcmArgSetMap: inout [ ModuleDependencyId : Set < [ String ] > ] )
@@ -113,6 +115,11 @@ private extension InterModuleDependencyGraph {
113
115
}
114
116
switch moduleId {
115
117
case . swift:
118
+ if visitedSwiftModules. contains ( moduleId) {
119
+ return
120
+ } else {
121
+ visitedSwiftModules. insert ( moduleId)
122
+ }
116
123
guard case . swift( let swiftModuleDetails) = moduleInfo. details else {
117
124
throw Driver . Error. malformedModuleDependency ( moduleId. moduleName,
118
125
" no Swift `details` object " )
You can’t perform that action at this time.
0 commit comments