swift
5e021bc5 - SILGen: Properly set up addressability scopes for case pattern bindings.

Commit
83 days ago
SILGen: Properly set up addressability scopes for case pattern bindings. In order to accommodate case bodies with multiple case labels, the AST represents the bindings in each pattern as a distinct declaration from the matching binding in the case body, and SILGen shares the variable representation between the two declarations. That means that the two declarations also need to be able to share an addressable representation. Add an "alias" state to the addressable buffer data structures so that we can refer back to the original case label var decl when the case body var decl is brought into scope, so that accesses through either decl properly force the addressable representation. Fixes rdar://154543619.
Author
Committer
Parents
Loading