Skip to content

Commit d525bac

Browse files
aslaschwaighofer
authored andcommitted
[6.0] Add missed case to AssignAddressToDef. (#72617)
Fixes #71744 Cherry-picked from a63078f rdar://135227988
1 parent aaa632c commit d525bac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/IRGen/LoadableByAddress.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3798,6 +3798,15 @@ class AssignAddressToDef : SILInstructionVisitor<AssignAddressToDef> {
37983798
assignment.mapValueToAddress(origValue, newAddr);
37993799
assignment.markForDeletion(bc);
38003800
}
3801+
3802+
void visitUncheckedBitwiseCastInst(UncheckedBitwiseCastInst *bc) {
3803+
auto builder = assignment.getBuilder(bc->getIterator());
3804+
auto opdAddr = assignment.getAddressForValue(bc->getOperand());
3805+
auto newAddr = builder.createUncheckedAddrCast(
3806+
bc->getLoc(), opdAddr, bc->getType().getAddressType());
3807+
assignment.mapValueToAddress(origValue, newAddr);
3808+
assignment.markForDeletion(bc);
3809+
}
38013810
};
38023811
} // namespace
38033812

0 commit comments

Comments
 (0)