@@ -1031,9 +1031,9 @@ class SILBuilder {
1031
1031
createUncheckedRefCastAddr (SILLocation Loc,
1032
1032
SILValue src, CanType sourceFormalType,
1033
1033
SILValue dest, CanType targetFormalType) {
1034
- return insert (new ( getModule ()) UncheckedRefCastAddrInst (
1034
+ return insert (UncheckedRefCastAddrInst::create (
1035
1035
getSILDebugLocation (Loc), src, sourceFormalType,
1036
- dest, targetFormalType));
1036
+ dest, targetFormalType, getFunction (), C. OpenedArchetypes ));
1037
1037
}
1038
1038
1039
1039
UncheckedAddrCastInst *createUncheckedAddrCast (SILLocation Loc, SILValue Op,
@@ -1152,9 +1152,9 @@ class SILBuilder {
1152
1152
createUnconditionalCheckedCastAddr (SILLocation Loc,
1153
1153
SILValue src, CanType sourceFormalType,
1154
1154
SILValue dest, CanType targetFormalType) {
1155
- return insert (new ( getModule ()) UnconditionalCheckedCastAddrInst (
1155
+ return insert (UnconditionalCheckedCastAddrInst::create (
1156
1156
getSILDebugLocation (Loc), src, sourceFormalType,
1157
- dest, targetFormalType));
1157
+ dest, targetFormalType, getFunction (), C. OpenedArchetypes ));
1158
1158
}
1159
1159
1160
1160
UnconditionalCheckedCastValueInst *
@@ -1989,9 +1989,10 @@ class SILBuilder {
1989
1989
SILBasicBlock *failureBB,
1990
1990
ProfileCounter Target1Count = ProfileCounter(),
1991
1991
ProfileCounter Target2Count = ProfileCounter()) {
1992
- return insertTerminator (new ( getModule ()) CheckedCastAddrBranchInst (
1992
+ return insertTerminator (CheckedCastAddrBranchInst::create (
1993
1993
getSILDebugLocation (Loc), consumption, src, sourceFormalType, dest,
1994
- targetFormalType, successBB, failureBB, Target1Count, Target2Count));
1994
+ targetFormalType, successBB, failureBB, Target1Count, Target2Count,
1995
+ getFunction (), C.OpenedArchetypes ));
1995
1996
}
1996
1997
1997
1998
// ===--------------------------------------------------------------------===//
0 commit comments