Add SIL instructions to convert between thin functions

and raw pointers.

Swift SVN r23992
This commit is contained in:
John McCall
2014-12-17 22:23:15 +00:00
parent e5c3b534fe
commit 5c8fbc704c
13 changed files with 140 additions and 4 deletions

View File

@@ -333,6 +333,16 @@ public:
return insert(new (F.getModule()) ConvertFunctionInst(Loc, Op, Ty));
}
ThinFunctionToPointerInst *
createThinFunctionToPointer(SILLocation Loc, SILValue Op, SILType Ty) {
return insert(new (F.getModule()) ThinFunctionToPointerInst(Loc, Op, Ty));
}
PointerToThinFunctionInst *
createPointerToThinFunction(SILLocation Loc, SILValue Op, SILType Ty) {
return insert(new (F.getModule()) PointerToThinFunctionInst(Loc, Op, Ty));
}
UpcastInst *createUpcast(SILLocation Loc, SILValue Op, SILType Ty) {
return insert(new (F.getModule()) UpcastInst(Loc, Op, Ty));
}