mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Carry the formal types of the arguments in the indirect-cast
instructions. Swift SVN r18934
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user