IRGen: Optionally use value witness instead of outlined value functions

... if type layout based value witness emission is enabled.

rdar://51988441
This commit is contained in:
Arnold Schwaighofer
2019-07-09 11:54:07 -07:00
parent dec2ad0f93
commit b7a58c0f96
4 changed files with 192 additions and 43 deletions

View File

@@ -197,7 +197,15 @@ bool SILModule::isTypeABIAccessible(SILType type,
"unexpected SIL lowered-only type with non-fixed layout");
// Otherwise, we need to be able to fetch layout-metadata for the type.
return isTypeMetadataForLayoutAccessible(*this, type);
return isTypeMetadataForLayoutAccessible(type);
}
bool SILModule::isTypeMetadataForLayoutAccessible(SILType type) {
if (type.is<ReferenceStorageType>() || type.is<SILFunctionType>() ||
type.is<AnyMetatypeType>())
return false;
return ::isTypeMetadataForLayoutAccessible(*this, type);
}
bool AbstractStorageDecl::exportsPropertyDescriptor() const {