mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add SIL instructions to convert between thin functions
and raw pointers. Swift SVN r23992
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user