Skip to content

Commit 3e0cd23

Browse files
committed
ClangImporter: Remove dead code for 'finishing' inherited conformances
This was added before we had 'associated conformances', which superceded the inherited conformances concept, so it's been dead for a while.
1 parent b9f1175 commit 3e0cd23

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7717,29 +7717,6 @@ static void finishTypeWitnesses(
77177717
}
77187718
}
77197719

7720-
/// Make sure any inherited conformances also get completed, if necessary.
7721-
static void finishInheritedConformances(
7722-
NormalProtocolConformance *conformance) {
7723-
auto *proto = conformance->getProtocol();
7724-
7725-
SmallVector<ProtocolDecl *, 2> inheritedProtos;
7726-
for (auto *inherited : proto->getInheritedProtocols())
7727-
inheritedProtos.push_back(inherited);
7728-
7729-
// Sort for deterministic import.
7730-
ProtocolType::canonicalizeProtocols(inheritedProtos);
7731-
7732-
// Schedule any that aren't complete.
7733-
for (auto *inherited : inheritedProtos) {
7734-
ModuleDecl *M = conformance->getDeclContext()->getParentModule();
7735-
auto inheritedConformance = M->lookupConformance(conformance->getType(),
7736-
inherited);
7737-
assert(inheritedConformance && inheritedConformance->isConcrete() &&
7738-
"inherited conformance not found");
7739-
(void)inheritedConformance;
7740-
}
7741-
}
7742-
77437720
/// A stripped-down version of Type::subst that only works on non-generic
77447721
/// associated types.
77457722
///
@@ -7837,7 +7814,6 @@ void ClangImporter::Implementation::finishNormalConformance(
78377814
conformance);
78387815

78397816
finishTypeWitnesses(conformance);
7840-
finishInheritedConformances(conformance);
78417817
finishSignatureConformances(conformance);
78427818

78437819
// Imported conformances to @objc protocols also require additional

0 commit comments

Comments
 (0)