AST: Remove unused 'resolver' parameter from ModuleDecl::lookupConformance()

... as well as a bunch of downstream plumbing that is no
longer necessary.
This commit is contained in:
Slava Pestov
2017-09-07 03:03:04 -07:00
parent 87a1354444
commit 9f8760b942
22 changed files with 44 additions and 74 deletions

View File

@@ -558,8 +558,7 @@ void ModuleDecl::getDisplayDecls(SmallVectorImpl<Decl*> &Results) const {
}
Optional<ProtocolConformanceRef>
ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol,
LazyResolver *resolver) {
ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol) {
ASTContext &ctx = getASTContext();
// A dynamic Self type conforms to whatever its underlying type
@@ -578,8 +577,7 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol,
// able to be resolved by a substitution that makes the archetype
// concrete.
if (auto super = archetype->getSuperclass()) {
if (auto inheritedConformance = lookupConformance(super, protocol,
resolver)) {
if (auto inheritedConformance = lookupConformance(super, protocol)) {
return ProtocolConformanceRef(
ctx.getInheritedConformance(
type,
@@ -619,8 +617,7 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol,
// If the existential is class-constrained, the class might conform
// concretely.
if (layout.superclass) {
if (auto result = lookupConformance(layout.superclass, protocol,
resolver))
if (auto result = lookupConformance(layout.superclass, protocol))
return result;
}
@@ -675,8 +672,7 @@ ModuleDecl::lookupConformance(Type type, ProtocolDecl *protocol,
superclassTy = superclassTy->getSuperclass();
// Compute the conformance for the inherited type.
auto inheritedConformance = lookupConformance(superclassTy, protocol,
resolver);
auto inheritedConformance = lookupConformance(superclassTy, protocol);
assert(inheritedConformance &&
"We already found the inherited conformance");