swift
3bb1766a - [SILOptimizer] Keep lexical lifetime markers.

Commit
4 years ago
[SILOptimizer] Keep lexical lifetime markers. Previously, TempRValueElimination would peephole simple alloc_stacks, even when they were lexical; here, they are left for Mem2Reg to properly handle. Previously, SemanticARCOpts would eliminate lexical begin_borrows, incorrectly allowing the lifetime of the value borrowed by them to be observably shortened. Here, those borrow scopes are not eliminated if they are lexical. Added an executable test that verifies that a local variable strongly referencing a delegate object keeps that delegate alive through the call to an object that weakly references the delegate and calls out to it.
Author
Committer
Parents
Loading