mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[concurrency] global actors in reslient modules need thick metatype.
Resolves rdar://72604101
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user