mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When an owned value has no lifetime ending uses it means that it is in a dead-end region. We must not remove and inserting compensating destroys for it because that would potentially destroy the value too early. Initialization of an object might be cut off and removed after a dead-end loop or an `unreachable`. In this case a class destructor would see uninitialized fields. Fixes a mis-compile https://github.com/swiftlang/swift/issues/85851 rdar://165876726
38 KiB
38 KiB