[SILGen] Separate the initialization of a wrapped property from a wrapped value

Teach SILGen to emit a separate SIL function to capture the
initialization of the backing storage type for a wrapped property
based on the wrapped value. This eliminates manual code expansion at
every use site.
This commit is contained in:
Doug Gregor
2019-09-20 09:52:39 -07:00
parent 3e48f71b27
commit ab5d161c05
26 changed files with 228 additions and 50 deletions

View File

@@ -133,6 +133,10 @@ struct SILDeclRef {
/// routines have an ivar destroyer, which is emitted as
/// .cxx_destruct.
IVarDestroyer,
/// References the wrapped value injection function used to initialize
/// the backing storage property from a wrapped value.
PropertyWrapperBackingInitializer,
};
/// The ValueDecl or AbstractClosureExpr represented by this SILDeclRef.