swift
a62a5caa - SILMem2Reg: fix a problem with leaking enum values

Commit
3 years ago
SILMem2Reg: fix a problem with leaking enum values When optimizing an enum `store` to an `alloc_stack`, require that all uses are in the same block. Otherwise it could be a `switch_enum` of an optional where the none-case does not have a destroy of the enum value. After transforming such an `alloc_stack`, the value would leak in the none-case block. It fixes the same OSSA verification error as done for TempRValueOpt in a previous commit.
Author
Committer
Parents
Loading