SILGen: Remove usage of getDeclaredTypeOfContext()

This commit is contained in:
Slava Pestov
2017-09-19 21:43:41 -07:00
parent e32841d319
commit 4773eacbef

View File

@@ -354,12 +354,11 @@ void SILGenFunction::emitValueConstructor(ConstructorDecl *ctor) {
}
void SILGenFunction::emitEnumConstructor(EnumElementDecl *element) {
CanType enumTy = element->getParentEnum()
->getDeclaredTypeInContext()
->getCanonicalType();
CanType enumIfaceTy = element->getParentEnum()
->getDeclaredInterfaceType()
->getCanonicalType();
CanType enumTy = F.mapTypeIntoContext(enumIfaceTy)
->getCanonicalType();
auto &enumTI = getTypeLowering(enumTy);
RegularLocation Loc(element);