Carry the formal types of the arguments in the indirect-cast

instructions.

Swift SVN r18934
This commit is contained in:
John McCall
2014-06-16 17:35:43 +00:00
parent 05b51f4fa7
commit f0e14f7e65
13 changed files with 202 additions and 172 deletions

View File

@@ -419,12 +419,14 @@ public:
}
UnconditionalCheckedCastAddrInst *
createUnconditionalCheckedCastAddr(SILLocation loc, CheckedCastKind kind,
createUnconditionalCheckedCastAddr(SILLocation loc,
CastConsumptionKind consumption,
SILValue src, SILValue dest) {
SILValue src, CanType sourceType,
SILValue dest, CanType targetType) {
return insert(new (F.getModule())
UnconditionalCheckedCastAddrInst(loc, kind, consumption,
src, dest));
UnconditionalCheckedCastAddrInst(loc, consumption,
src, sourceType,
dest, targetType));
}
RetainValueInst *createRetainValue(SILLocation loc, SILValue operand) {
@@ -910,15 +912,17 @@ public:
}
CheckedCastAddrBranchInst *createCheckedCastAddrBranch(SILLocation loc,
CheckedCastKind kind,
CastConsumptionKind consumption,
SILValue src,
CanType sourceType,
SILValue dest,
CanType targetType,
SILBasicBlock *successBB,
SILBasicBlock *failureBB) {
return insertTerminator(new (F.getModule())
CheckedCastAddrBranchInst(loc, kind, consumption,
src, dest,
CheckedCastAddrBranchInst(loc, consumption,
src, sourceType,
dest, targetType,
successBB, failureBB));
}