APIDigester: Sort conformances when dumping sdk

See https://github.com/swiftlang/swift/pull/84193 for context.
This commit is contained in:
Anthony Latsis
2025-09-12 14:24:16 +01:00
parent f24f5de76e
commit e101d0aa58
4 changed files with 397 additions and 394 deletions

View File

@@ -1988,7 +1988,7 @@ SwiftDeclCollector::addConformancesToTypeDecl(SDKNodeDeclType *Root,
} else {
// Avoid adding the same conformance twice.
SmallPtrSet<ProtocolConformance*, 4> Seen;
for (auto &Conf: NTD->getAllConformances()) {
for (auto &Conf: NTD->getAllConformances(/*sorted=*/true)) {
if (!Ctx.shouldIgnore(Conf->getProtocol()) && !Seen.count(Conf))
Root->addConformance(constructConformanceNode(Conf));
Seen.insert(Conf);