diff --git a/lib/IRGen/LoadableByAddress.cpp b/lib/IRGen/LoadableByAddress.cpp index f7c24f0ff230a..f9eda93f7b0a9 100644 --- a/lib/IRGen/LoadableByAddress.cpp +++ b/lib/IRGen/LoadableByAddress.cpp @@ -3798,6 +3798,15 @@ class AssignAddressToDef : SILInstructionVisitor { assignment.mapValueToAddress(origValue, newAddr); assignment.markForDeletion(bc); } + + void visitUncheckedBitwiseCastInst(UncheckedBitwiseCastInst *bc) { + auto builder = assignment.getBuilder(bc->getIterator()); + auto opdAddr = assignment.getAddressForValue(bc->getOperand()); + auto newAddr = builder.createUncheckedAddrCast( + bc->getLoc(), opdAddr, bc->getType().getAddressType()); + assignment.mapValueToAddress(origValue, newAddr); + assignment.markForDeletion(bc); + } }; } // namespace