File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1764,11 +1764,7 @@ void WitnessTableBuilderBase::defineAssociatedTypeWitnessTableAccessFunction(
17641764 CanType associatedType,
17651765 ProtocolConformanceRef associatedConformance) {
17661766 bool hasArchetype = associatedType->hasArchetype ();
1767- OpaqueTypeArchetypeType *associatedRootOpaqueType = nullptr ;
1768- if (auto assocArchetype = dyn_cast<ArchetypeType>(associatedType)) {
1769- associatedRootOpaqueType = dyn_cast<OpaqueTypeArchetypeType>(
1770- assocArchetype->getRoot ());
1771- }
1767+ bool isOpaqueArchetype = isa<OpaqueTypeArchetypeType>(associatedType);
17721768
17731769 assert (isa<NormalProtocolConformance>(Conformance) && " has associated type" );
17741770
@@ -1827,7 +1823,7 @@ void WitnessTableBuilderBase::defineAssociatedTypeWitnessTableAccessFunction(
18271823 }
18281824
18291825 // If there are no archetypes, return a reference to the table.
1830- if (!hasArchetype && !associatedRootOpaqueType ) {
1826+ if (!hasArchetype && !isOpaqueArchetype ) {
18311827 auto wtable = conformanceI->getTable (IGF, &associatedTypeMetadata);
18321828 IGF.Builder .CreateRet (wtable);
18331829 return ;
You can’t perform that action at this time.
0 commit comments