[Property Wrappers] Use autoclosure information from CSApply to compute

`VarDecl::getPropertyWrapperInitValueInterfaceType`.
This commit is contained in:
Holly Borla
2020-07-13 16:23:31 -07:00
parent bf47403162
commit a6c33a9611
18 changed files with 137 additions and 159 deletions

View File

@@ -852,7 +852,8 @@ void SILGenFunction::emitGeneratorFunction(SILDeclRef function, Expr *value,
auto var = cast<VarDecl>(function.getDecl());
auto wrappedInfo = var->getPropertyWrapperBackingPropertyInfo();
auto param = params->get(0);
opaqueValue.emplace(*this, wrappedInfo.underlyingValue,
auto *placeholder = wrappedInfo.wrappedValuePlaceholder;
opaqueValue.emplace(*this, placeholder->getOpaqueValuePlaceholder(),
maybeEmitValueOfLocalVarDecl(param));
assert(value == wrappedInfo.initializeFromOriginal);