[AST] Remove GenericSignature params from GenericEnvironment methods.

The GenericEnvironment stores a signature internally.
This commit is contained in:
Huon Wilson
2016-11-01 18:36:03 -07:00
parent 1102cf6643
commit 5a08879d06
10 changed files with 13 additions and 29 deletions

View File

@@ -490,9 +490,8 @@ void SILGenFunction::emitClassConstructorAllocator(ConstructorDecl *ctor) {
// Call the initializer.
ArrayRef<Substitution> forwardingSubs;
if (auto *genericEnv = ctor->getGenericEnvironmentOfContext()) {
auto *genericSig = ctor->getGenericSignatureOfContext();
forwardingSubs = genericEnv->getForwardingSubstitutions(
SGM.SwiftModule, genericSig);
SGM.SwiftModule);
}
std::tie(initVal, initTy, subs)
= emitSiblingMethodRef(Loc, selfValue, initConstant, forwardingSubs);
@@ -882,9 +881,8 @@ void SILGenFunction::emitMemberInitializers(DeclContext *dc,
ArrayRef<Substitution> subs;
auto *genericEnv = dc->getGenericEnvironmentOfContext();
if (genericEnv) {
auto *genericSig = dc->getGenericSignatureOfContext();
subs = genericEnv->getForwardingSubstitutions(
SGM.SwiftModule, genericSig);
SGM.SwiftModule);
}
// Get the type of the initialization result, in terms