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 {
87
87
Type operator ()(SubstitutableType *type) const ;
88
88
};
89
89
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
-
99
90
// / Function used to resolve conformances.
100
91
using GenericFunction = auto (CanType dependentType,
101
92
Type conformingReplacementType,
Original file line number Diff line number Diff line change @@ -50,27 +50,6 @@ Type QueryTypeSubstitutionMap::operator()(SubstitutableType *type) const {
50
50
return Type ();
51
51
}
52
52
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
-
74
53
Type QuerySubstitutionMap::operator ()(SubstitutableType *type) const {
75
54
auto key = cast<SubstitutableType>(type->getCanonicalType ());
76
55
return subMap.lookupSubstitution (key);
You can’t perform that action at this time.
0 commit comments