mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Improve indentation in debugging output
This commit is contained in:
@@ -3958,7 +3958,7 @@ SolutionResult ConstraintSystem::salvage() {
|
||||
int i = 0;
|
||||
for (auto &solution : viable) {
|
||||
log << "---Ambiguous solution #" << i++ << "---\n";
|
||||
solution.dump(log);
|
||||
solution.dump(log, solverState->getCurrentIndent());
|
||||
log << "\n";
|
||||
}
|
||||
}
|
||||
@@ -4692,13 +4692,15 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
|
||||
return true;
|
||||
|
||||
if (isDebugMode()) {
|
||||
auto &log = llvm::errs();
|
||||
auto indent = solverState->getCurrentIndent();
|
||||
auto &log = llvm::errs().indent(indent);
|
||||
log << "--- Ambiguity: Considering #" << solutions.size()
|
||||
<< " solutions with fixes ---\n";
|
||||
int i = 0;
|
||||
for (auto &solution : solutions) {
|
||||
log << "\n--- Solution #" << i++ << "---\n";
|
||||
solution.dump(log);
|
||||
log << "\n";
|
||||
log.indent(indent) << "--- Solution #" << i++ << "---\n";
|
||||
solution.dump(log, indent);
|
||||
log << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user