File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -812,13 +812,13 @@ extension Driver {
812812 return ( key, outputPaths)
813813 } )
814814
815- func collectSwiftModuleNames ( _ ids: [ ModuleDependencyId ] ) -> [ String ] {
816- return ids. compactMap { id in
815+ func collectUniqueSwiftModuleNames ( _ ids: [ ModuleDependencyId ] ) -> [ String ] {
816+ return Array ( Set ( ids. compactMap { id in
817817 if case . swift( let module) = id {
818818 return module
819819 }
820820 return nil
821- }
821+ } ) )
822822 }
823823
824824 func getSwiftDependencies( for module: String ) -> [ String ] {
@@ -827,7 +827,7 @@ extension Driver {
827827 guard !dependencies. isEmpty else {
828828 return [ ]
829829 }
830- return collectSwiftModuleNames ( dependencies)
830+ return collectUniqueSwiftModuleNames ( dependencies)
831831 }
832832
833833 func getOutputPaths( withName modules: [ String ] , loadableFor arch: Triple . Arch ) throws -> [ TypedVirtualPath ] {
@@ -870,7 +870,7 @@ extension Driver {
870870 // Keep track of modules we haven't handled.
871871 var unhandledModules = Set < String > ( inputMap. keys)
872872 // Start from those modules explicitly imported into the file under scanning
873- var openModules = collectSwiftModuleNames ( dependencyGraph. mainModule. allDependencies)
873+ var openModules = collectUniqueSwiftModuleNames ( dependencyGraph. mainModule. allDependencies)
874874 var idx = 0
875875 while idx != openModules. count {
876876 let module = openModules [ idx]
You can’t perform that action at this time.
0 commit comments