mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SILGen: Small cleanup for emitClassConstructorAllocator()
This commit is contained in:
@@ -568,17 +568,7 @@ void SILGenFunction::emitClassConstructorAllocator(ConstructorDecl *ctor) {
|
||||
SILType initTy;
|
||||
|
||||
// Call the initializer.
|
||||
SubstitutionMap subMap;
|
||||
if (auto *genericEnv = ctor->getGenericEnvironmentOfContext()) {
|
||||
auto *genericSig = genericEnv->getGenericSignature();
|
||||
subMap = SubstitutionMap::get(
|
||||
genericSig,
|
||||
[&](SubstitutableType *t) -> Type {
|
||||
return genericEnv->mapTypeIntoContext(
|
||||
t->castTo<GenericTypeParamType>());
|
||||
},
|
||||
MakeAbstractConformanceForGenericType());
|
||||
}
|
||||
auto subMap = F.getForwardingSubstitutionMap();
|
||||
|
||||
std::tie(initVal, initTy)
|
||||
= emitSiblingMethodRef(Loc, selfValue, initConstant, subMap);
|
||||
|
||||
Reference in New Issue
Block a user