SIL: Add DeallocExistentialInst.

Needed to represent deinitializing a partially-initialized existential in which the value witness table has been populated by alloc_existential but the value has not been initialized yet.

Swift SVN r3565
This commit is contained in:
Joe Groff
2012-12-20 20:18:54 +00:00
parent 662861fd66
commit c2f9b197ad
7 changed files with 47 additions and 6 deletions

View File

@@ -220,7 +220,8 @@ public:
}
ArchetypeMethodInst *createArchetypeMethod(SILLocation Loc, Value Operand,
SILConstant Member, SILType MethodTy)
SILConstant Member,
SILType MethodTy)
{
return insert(new ArchetypeMethodInst(Loc, Operand, Member, MethodTy, F));
}
@@ -243,6 +244,11 @@ public:
return insert(new AllocExistentialInst(Loc, Existential, ConcreteType, F));
}
DeallocExistentialInst *createDeallocExistential(SILLocation Loc,
Value Existential) {
return insert(new DeallocExistentialInst(Loc, Existential));
}
MetatypeInst *createMetatype(SILLocation Loc, SILType Metatype) {
return insert(new MetatypeInst(Loc, Metatype));
}