@@ -1544,7 +1544,7 @@ void LoadableStorageAllocation::
1544
1544
storageType);
1545
1545
if (pass.containsDifferentFunctionSignature (pass.F ->getLoweredFunctionType (),
1546
1546
storageType)) {
1547
- auto *castInstr = argBuilder.createUncheckedBitCast (
1547
+ auto *castInstr = argBuilder.createUncheckedReinterpretCast (
1548
1548
RegularLocation (const_cast <ValueDecl *>(arg->getDecl ())), arg,
1549
1549
newSILType);
1550
1550
arg->replaceAllUsesWith (castInstr);
@@ -1912,8 +1912,8 @@ static void castTupleInstr(SingleValueInstruction *instr, IRGenModule &Mod,
1912
1912
switch (instr->getKind ()) {
1913
1913
// Add cast to the new sil function type:
1914
1914
case SILInstructionKind::TupleExtractInst: {
1915
- castInstr = castBuilder.createUncheckedBitCast (instr-> getLoc (), instr,
1916
- newSILType.getObjectType ());
1915
+ castInstr = castBuilder.createUncheckedReinterpretCast (
1916
+ instr-> getLoc (), instr, newSILType.getObjectType ());
1917
1917
break ;
1918
1918
}
1919
1919
case SILInstructionKind::TupleElementAddrInst: {
@@ -2471,8 +2471,8 @@ getOperandTypeWithCastIfNecessary(SILInstruction *containingInstr, SILValue op,
2471
2471
}
2472
2472
assert (currSILType.isObject () && " Expected an object type" );
2473
2473
if (newSILType != currSILType) {
2474
- auto castInstr = builder.createUncheckedBitCast (containingInstr-> getLoc (),
2475
- op, newSILType);
2474
+ auto castInstr = builder.createUncheckedReinterpretCast (
2475
+ containingInstr-> getLoc (), op, newSILType);
2476
2476
return castInstr;
2477
2477
}
2478
2478
}
@@ -2653,8 +2653,8 @@ bool LoadableByAddress::recreateUncheckedEnumDataInstr(
2653
2653
auto *takeEnum = enumBuilder.createUncheckedEnumData (
2654
2654
enumInstr->getLoc (), enumInstr->getOperand (), enumInstr->getElement (),
2655
2655
caseTy);
2656
- newInstr = enumBuilder.createUncheckedBitCast (enumInstr->getLoc (), takeEnum ,
2657
- newType);
2656
+ newInstr = enumBuilder.createUncheckedReinterpretCast (enumInstr->getLoc (),
2657
+ takeEnum, newType);
2658
2658
} else {
2659
2659
newInstr = enumBuilder.createUncheckedEnumData (
2660
2660
enumInstr->getLoc (), enumInstr->getOperand (), enumInstr->getElement (),
@@ -2708,7 +2708,7 @@ bool LoadableByAddress::fixStoreToBlockStorageInstr(
2708
2708
if (destType.getObjectType () != srcType) {
2709
2709
// Add cast to destType
2710
2710
SILBuilderWithScope castBuilder (instr);
2711
- auto *castInstr = castBuilder.createUncheckedBitCast (
2711
+ auto *castInstr = castBuilder.createUncheckedReinterpretCast (
2712
2712
instr->getLoc (), src, destType.getObjectType ());
2713
2713
instr->setOperand (StoreInst::Src, castInstr);
2714
2714
}
0 commit comments