Skip to content

Commit bdfb609

Browse files
authored
[ConstraintSystem] Add index value (as an impact of the score kind) to output of debug constraints. (#78740)
* [ConstraintSystem] Add index value (as an impact of the score kind) to debug constraints. * Use weight instead of index, change label 'value' -> 'impact' * Fix debug constraints output format: remove 'components' and add 'weight' label
1 parent 76d1ea3 commit bdfb609

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,9 +1196,11 @@ struct Score {
11961196
bool hasNonDefault = false;
11971197
for (unsigned int i = 0; i < NumScoreKinds; ++i) {
11981198
if (Data[i] != 0) {
1199-
out << " [component: ";
1199+
out << " [";
12001200
out << getNameFor(ScoreKind(i));
1201-
out << "(s), value: ";
1201+
out << "(s), weight: ";
1202+
out << std::to_string(NumScoreKinds - i);
1203+
out << ", impact: ";
12021204
out << std::to_string(Data[i]);
12031205
out << "]";
12041206
hasNonDefault = true;

0 commit comments

Comments
 (0)