Commit Graph

3 Commits

Author SHA1 Message Date
Joe Groff
3d377fb1fc Update resilient_assign_by_wrapper test for subst function types 2020-02-24 12:14:21 -08:00
Robert Widmann
3e4a820fb4 [SILGen] Handle Reabstraction and Substitution in assign_by_wrapper
Use the substitution map for the LValue component to properly handle the
case where we need to re-abstract the argument to the assign_by_wrapper
setter.

Resolves rdar://59553318
2020-02-18 14:59:03 -08:00
Robert Widmann
3b11c2b170 [SILGen] Materialize Arguments To Property Wrapper Setters If Needed
Codegen for the assign_by_wrapper instruction emits prepared arguments
directly into the initializer or accessor functions. This means it
misses out on the CC matching code that the general apply path uses.

In this particular case, an enum value was constructed within the
resilience boundary, but passed to the setter for a wrapper property
that expected it to be in memory.

Check the calling convention before we emit the assign_by_wrapper
instruction, and materialize an address for indirect CCs as required.

resolves rdar://59071930
2020-02-18 09:10:07 -08:00