File tree Expand file tree Collapse file tree 4 files changed +5
-19
lines changed Expand file tree Collapse file tree 4 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -170,9 +170,6 @@ class GenericSignature {
170
170
// / Stores a set of requirements on a type parameter. Used by
171
171
// / GenericEnvironment for building archetypes.
172
172
struct LocalRequirements {
173
- Type anchor;
174
-
175
- Type concreteType;
176
173
Type superclass;
177
174
178
175
RequiredProtocols protos;
Original file line number Diff line number Diff line change @@ -327,8 +327,7 @@ GenericSignature::LocalRequirements
327
327
GenericSignatureImpl::getLocalRequirements (Type depType) const {
328
328
assert (depType->isTypeParameter () && " Expected a type parameter here" );
329
329
330
- return getRequirementMachine ()->getLocalRequirements (
331
- depType, getGenericParams ());
330
+ return getRequirementMachine ()->getLocalRequirements (depType);
332
331
}
333
332
334
333
ASTContext &GenericSignatureImpl::getASTContext () const {
Original file line number Diff line number Diff line change @@ -48,30 +48,21 @@ using namespace rewriting;
48
48
// / Collects all requirements on a type parameter that are used to construct
49
49
// / its ArchetypeType in a GenericEnvironment.
50
50
GenericSignature::LocalRequirements
51
- RequirementMachine::getLocalRequirements (
52
- Type depType,
53
- ArrayRef<GenericTypeParamType *> genericParams) const {
51
+ RequirementMachine::getLocalRequirements (Type depType) const {
54
52
auto term = Context.getMutableTermForType (depType->getCanonicalType (),
55
53
/* proto=*/ nullptr );
56
54
System.simplify (term);
57
55
verify (term);
58
56
59
57
GenericSignature::LocalRequirements result;
60
- result.anchor = Map.getTypeForTerm (term, genericParams);
61
- result.packShape = getReducedShape (depType, genericParams);
58
+ result.packShape = getReducedShape (depType, {});
62
59
63
60
auto *props = Map.lookUpProperties (term);
64
61
if (!props)
65
62
return result;
66
63
67
- if (props->isConcreteType ()) {
68
- result.concreteType = props->getConcreteType ({}, term, Map);
69
- return result;
70
- }
71
-
72
- if (props->hasSuperclassBound ()) {
64
+ if (props->hasSuperclassBound ())
73
65
result.superclass = props->getSuperclassBound ({}, term, Map);
74
- }
75
66
76
67
for (const auto *proto : props->getConformsTo ())
77
68
result.protos .push_back (const_cast <ProtocolDecl *>(proto));
Original file line number Diff line number Diff line change @@ -140,8 +140,7 @@ class RequirementMachine final {
140
140
// Generic signature queries. Generally you shouldn't have to construct a
141
141
// RequirementMachine instance; instead, call the corresponding methods on
142
142
// GenericSignature, which lazily create a RequirementMachine for you.
143
- GenericSignature::LocalRequirements getLocalRequirements (Type depType,
144
- ArrayRef<GenericTypeParamType *> genericParams) const ;
143
+ GenericSignature::LocalRequirements getLocalRequirements (Type depType) const ;
145
144
bool requiresClass (Type depType) const ;
146
145
LayoutConstraint getLayoutConstraint (Type depType) const ;
147
146
bool requiresProtocol (Type depType, const ProtocolDecl *proto) const ;
You can’t perform that action at this time.
0 commit comments