We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 010c1cd commit 81a2157Copy full SHA for 81a2157
include/swift/SIL/SILCloner.h
@@ -1542,6 +1542,13 @@ template <typename ImplClass>
1542
void SILCloner<ImplClass>::visitUncheckedValueCastInst(
1543
UncheckedValueCastInst *Inst) {
1544
getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
1545
+ if (!getBuilder().hasOwnership()) {
1546
+ recordClonedInstruction(Inst, getBuilder().createUncheckedBitwiseCast(
1547
+ getOpLocation(Inst->getLoc()),
1548
+ getOpValue(Inst->getOperand()),
1549
+ getOpType(Inst->getType())));
1550
+ return;
1551
+ }
1552
recordClonedInstruction(Inst, getBuilder().createUncheckedValueCast(
1553
getOpLocation(Inst->getLoc()),
1554
getOpValue(Inst->getOperand()),
0 commit comments