[concurrency] global actors in reslient modules need thick metatype.

Resolves rdar://72604101
This commit is contained in:
Kavon Farvardin
2020-12-23 13:35:07 -08:00
parent fabd45e7c3
commit f76645dab1
3 changed files with 33 additions and 1 deletions

View File

@@ -514,10 +514,15 @@ SILValue SILGenFunction::emitLoadGlobalActorExecutor(Type globalActor) {
Type instanceType =
actorType->getTypeOfMember(SGM.SwiftModule, sharedInstanceDecl);
auto metaRepr =
nominal->isResilient(SGM.SwiftModule, ResilienceExpansion::Maximal)
? MetatypeRepresentation::Thick
: MetatypeRepresentation::Thin;
ManagedValue actorMetaType =
ManagedValue::forUnmanaged(B.createMetatype(loc,
SILType::getPrimitiveObjectType(
CanMetatypeType::get(actorType, MetatypeRepresentation::Thin))));
CanMetatypeType::get(actorType, metaRepr))));
RValue actorInstanceRV = emitRValueForStorageLoad(loc, actorMetaType,
actorType, /*isSuper*/ false, sharedInstanceDecl, PreparedArguments(),