Skip to content

Commit 29a3d08

Browse files
author
David Ungar
authored
Merge pull request swiftlang#32886 from davidungar/fix-show-incremental-assertion
Remove uniqueness assertion in job sorting.
2 parents 76f6972 + 6171c41 commit 29a3d08

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/Driver/Compilation.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,10 +2060,7 @@ void Compilation::sortJobsToMatchCompilationInputs(
20602060
if (const CompileJobAction *CJA =
20612061
dyn_cast<CompileJobAction>(&J->getSource())) {
20622062
const InputAction *IA = CJA->findSingleSwiftInput();
2063-
auto R =
2064-
jobsByInput.insert(std::make_pair(IA->getInputArg().getValue(), J));
2065-
assert(R.second);
2066-
(void)R;
2063+
jobsByInput.insert(std::make_pair(IA->getInputArg().getValue(), J));
20672064
} else
20682065
sortedJobs.push_back(J);
20692066
}

lib/Driver/FineGrainedDependencyDriverGraph.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ std::vector<StringRef> ModuleDepGraph::getExternalDependencies() const {
196196
}
197197

198198
// Add every (swiftdeps) use of the external dependency to foundJobs.
199+
// Can return duplicates, but it doesn't break anything, and they will be
200+
// canonicalized later.
199201
std::vector<const Job *> ModuleDepGraph::findExternallyDependentUntracedJobs(
200202
StringRef externalDependency) {
201203
FrontendStatsTracer tracer(

unittests/Driver/TypeBodyFingerprintsDependencyGraphTests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// would be excluded in the coarse-grained graph. But since these will be jobs
1414
// that have already been scheduled, downstream mechanisms will filter them out.
1515

16+
// \c \c findExternallyDependentUntracedJobs may also return duplicates
17+
1618
// To debug a test, create the \c ModuleDepGraph and pass true as the second
1719
// argument to the constructor, then find the dot files in the directory
1820
// where the tests run,

0 commit comments

Comments
 (0)