Skip to content

Commit 3f308b7

Browse files
authored
Merge pull request swiftlang#11065 from rudkx/improve-debug-constraints
[CS] Dump the number of viable solutions with -debug-constraints.
2 parents 1991d0e + 8420977 commit 3f308b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/CSRanking.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,12 @@ ConstraintSystem::findBestSolution(SmallVectorImpl<Solution> &viable,
12071207
if (viable.size() == 1)
12081208
return 0;
12091209

1210+
if (TC.getLangOpts().DebugConstraintSolver) {
1211+
auto &log = getASTContext().TypeCheckerDebug->getStream();
1212+
log.indent(solverState->depth * 2)
1213+
<< "Comparing " << viable.size() << " viable solutions\n";
1214+
}
1215+
12101216
SolutionDiff diff(viable);
12111217

12121218
// Find a potential best.

0 commit comments

Comments
 (0)