Add support for unconditional checked cast instruction for opaque value types + SILGen support for it

This commit is contained in:
Joe Shajrawi
2017-02-22 16:17:00 -08:00
parent 20bdedf17e
commit ec1e3ee20e
20 changed files with 158 additions and 15 deletions

View File

@@ -797,6 +797,13 @@ public:
targetType));
}
UnconditionalCheckedCastOpaqueInst *
createUnconditionalCheckedCastOpaque(SILLocation Loc, SILValue op,
SILType destTy) {
return insert(UnconditionalCheckedCastOpaqueInst::create(
getSILDebugLocation(Loc), op, destTy, F, OpenedArchetypes));
}
RetainValueInst *createRetainValue(SILLocation Loc, SILValue operand,
Atomicity atomicity) {
assert(isParsing || F.hasUnqualifiedOwnership());