File tree Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Expand file tree Collapse file tree 2 files changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,6 @@ struct QueryTypeSubstitutionMap {
8787 Type operator ()(SubstitutableType *type) const ;
8888};
8989
90- // / A function object suitable for use as a \c TypeSubstitutionFn that
91- // / queries an underlying \c TypeSubstitutionMap, or returns the original type
92- // / if no match was found.
93- struct QueryTypeSubstitutionMapOrIdentity {
94- const TypeSubstitutionMap &substitutions;
95-
96- Type operator ()(SubstitutableType *type) const ;
97- };
98-
9990// / Function used to resolve conformances.
10091using GenericFunction = auto (CanType dependentType,
10192 Type conformingReplacementType,
Original file line number Diff line number Diff line change @@ -50,27 +50,6 @@ Type QueryTypeSubstitutionMap::operator()(SubstitutableType *type) const {
5050 return Type ();
5151}
5252
53- Type
54- QueryTypeSubstitutionMapOrIdentity::operator ()(SubstitutableType *type) const {
55- // FIXME: Type::subst should not be pass in non-root archetypes.
56- // Consider only root archetypes.
57- if (auto *archetype = dyn_cast<ArchetypeType>(type)) {
58- if (!archetype->isRoot ())
59- return Type ();
60- }
61-
62- auto key = type->getCanonicalType ()->castTo <SubstitutableType>();
63- auto known = substitutions.find (key);
64- if (known != substitutions.end () && known->second )
65- return known->second ;
66-
67- if (isa<PackArchetypeType>(type) || type->isRootParameterPack ()) {
68- return PackType::getSingletonPackExpansion (type);
69- }
70-
71- return type;
72- }
73-
7453Type QuerySubstitutionMap::operator ()(SubstitutableType *type) const {
7554 auto key = cast<SubstitutableType>(type->getCanonicalType ());
7655 return subMap.lookupSubstitution (key);
You can’t perform that action at this time.
0 commit comments