Skip to content

Commit 90a1bb8

Browse files
committed
[Dependency Scanning] Do not treat modules as their own dependencies
1 parent ae2287d commit 90a1bb8

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
@@ -254,6 +254,10 @@ computeTransitiveClosureOfExplicitDependencies(
254254
llvm::set_union(modReachableSet, succReachableSet);
255255
}
256256
}
257+
// For ease of use down-the-line, remove the node's self from its set of reachable nodes
258+
for (const auto &modID : topologicallySortedModuleList)
259+
result[modID].erase(modID);
260+
257261
return result;
258262
}
259263

0 commit comments

Comments
 (0)