Files
Erik Eckstein 3ef4838fab CopyToBorrowOptimization: don't remove destroys of values with deinits
If a copied value is forwarded into a non-copyable struct or enum which has a deinit, the destroy of the forwarded value calls the deinit.
Converting the forwarding instruction to guaranteed ownership erased this destroy, and therefore dropped the call of the deinit.

Fix this by not converting forwarding instructions which produce a value type with a deinit.

Fixes a mis-compile.
rdar://190730702
2026-10-23 09:46:28 +01:00
..
2026-10-19 14:48:39 -07:00