Skip to content

Commit bb295c7

Browse files
committed
SILGen: "sort" the witness tables in declaration order
Emit the tables in the declaration order. This ensures that we get identical emission ordering across Windows and Linux. This imporves the test pass rate on Windows for the SILGen tests.
1 parent 47f9dd1 commit bb295c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILGen/SILGenType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ class SILGenType : public TypeMemberVisitor<SILGenType> {
969969
// are existential and do not have witness tables.
970970
for (auto *conformance : theType->getLocalConformances(
971971
ConformanceLookupKind::All,
972-
nullptr, /*sorted=*/true)) {
972+
nullptr, /*sorted=*/false)) {
973973
if (conformance->isComplete() &&
974974
isa<NormalProtocolConformance>(conformance))
975975
SGM.getWitnessTable(conformance);
@@ -1064,7 +1064,7 @@ class SILGenExtension : public TypeMemberVisitor<SILGenExtension> {
10641064
// extension.
10651065
for (auto *conformance : e->getLocalConformances(
10661066
ConformanceLookupKind::All,
1067-
nullptr, /*sorted=*/true)) {
1067+
nullptr, /*sorted=*/false)) {
10681068
if (conformance->isComplete() &&
10691069
isa<NormalProtocolConformance>(conformance))
10701070
SGM.getWitnessTable(conformance);

0 commit comments

Comments
 (0)