We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2572885 commit db4c28aCopy full SHA for db4c28a
lib/IRGen/GenProto.cpp
@@ -2485,8 +2485,11 @@ IRGenModule::getConformanceInfo(const ProtocolDecl *protocol,
2485
2486
const ConformanceInfo *info;
2487
2488
- if (Context.LangOpts.hasFeature(Feature::Embedded)) {
2489
- if (auto *sc = dyn_cast<SpecializedProtocolConformance>(conformance)) {
+ // If there is a specialized SILWitnessTable for the specialized conformance,
+ // directly use it.
2490
+ if (auto *sc = dyn_cast<SpecializedProtocolConformance>(conformance)) {
2491
+ SILWitnessTable *wt = getSILModule().lookUpWitnessTable(conformance);
2492
+ if (wt && wt->getConformance() == sc) {
2493
info = new SpecializedConformanceInfo(sc);
2494
Conformances.try_emplace(conformance, info);
2495
return *info;
0 commit comments