mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Edge fix
This commit is contained in:
@@ -92,7 +92,6 @@ void ModuleDepGraph::markTransitive(
|
|||||||
findDependentNodesAndRecordCascadingOnes(dependentNodes,
|
findDependentNodesAndRecordCascadingOnes(dependentNodes,
|
||||||
fileAndNode.second);
|
fileAndNode.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
computeUniqueJobsFromNodes(consequentJobsToRecompile, dependentNodes);
|
computeUniqueJobsFromNodes(consequentJobsToRecompile, dependentNodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,9 +329,6 @@ void ModuleDepGraph::forEachArc(
|
|||||||
void ModuleDepGraph::findDependentNodesAndRecordCascadingOnes(
|
void ModuleDepGraph::findDependentNodesAndRecordCascadingOnes(
|
||||||
std::unordered_set<const ModuleDepGraphNode *> &foundDependents,
|
std::unordered_set<const ModuleDepGraphNode *> &foundDependents,
|
||||||
const ModuleDepGraphNode *definition) {
|
const ModuleDepGraphNode *definition) {
|
||||||
// Cycle recording and check.
|
|
||||||
if (!foundDependents.insert(definition).second)
|
|
||||||
return;
|
|
||||||
|
|
||||||
size_t pathLengthAfterArrival = traceArrival(definition);
|
size_t pathLengthAfterArrival = traceArrival(definition);
|
||||||
|
|
||||||
@@ -341,6 +337,9 @@ void ModuleDepGraph::findDependentNodesAndRecordCascadingOnes(
|
|||||||
"Should only call me for Decl nodes.");
|
"Should only call me for Decl nodes.");
|
||||||
|
|
||||||
forEachUseOf(definition, [&](const ModuleDepGraphNode *u) {
|
forEachUseOf(definition, [&](const ModuleDepGraphNode *u) {
|
||||||
|
// Cycle recording and check.
|
||||||
|
if (!foundDependents.insert(u).second)
|
||||||
|
return;
|
||||||
if (u->getKey().isInterface() && u->getSwiftDeps().hasValue()) {
|
if (u->getKey().isInterface() && u->getSwiftDeps().hasValue()) {
|
||||||
// An interface depends on something. Thus, if that something changes
|
// An interface depends on something. Thus, if that something changes
|
||||||
// the interface must be recompiled. But if an interface changes, then
|
// the interface must be recompiled. But if an interface changes, then
|
||||||
|
|||||||
Reference in New Issue
Block a user