Skip to content

Commit 7bbc4d4

Browse files
committed
[Dependency Scanning] Do not treat modules as their own dependencies
1 parent a02ba4b commit 7bbc4d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/DependencyScan/ScanDependencies.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ computeTransitiveClosureOfExplicitDependencies(
243243
llvm::set_union(modReachableSet, succReachableSet);
244244
}
245245
}
246+
// For ease of use down-the-line, remove the node's self from its set of reachable nodes
247+
for (const auto &modID : topologicallySortedModuleList)
248+
result[modID].erase(modID);
249+
246250
return result;
247251
}
248252

0 commit comments

Comments
 (0)