SIL: Add ExistentialMethodInst.

Like ArchetypeMethodInst for existential types. Factor out a common WitnessTableMethodInst for both insns.

Swift SVN r3506
This commit is contained in:
Joe Groff
2012-12-15 02:15:51 +00:00
parent 112d0e1282
commit 6d77ef4041
6 changed files with 98 additions and 22 deletions

View File

@@ -220,6 +220,13 @@ public:
return insert(new ArchetypeMethodInst(Loc, Operand, Member, MethodTy, F));
}
ExistentialMethodInst *createExistentialMethod(SILLocation Loc,
Value Operand,
SILConstant Member,
Type MethodTy) {
return insert(new ExistentialMethodInst(Loc, Operand, Member, MethodTy, F));
}
MetatypeInst *createMetatype(Expr *Expr) {
return insert(new MetatypeInst(Expr));
}