@@ -671,7 +671,7 @@ static MetadataResponse emitNominalMetadataRef(IRGenFunction &IGF,
671
671
} else if (auto theClass = dyn_cast<ClassDecl>(theDecl)) {
672
672
if (isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable (
673
673
IGF.IGM , *theClass, theType,
674
- /* usingCanonicalSpecializedAccessor= */ true )) {
674
+ ForUseOnlyFromAccessor )) {
675
675
llvm::Function *accessor =
676
676
IGF.IGM
677
677
.getAddrOfCanonicalSpecializedGenericTypeMetadataAccessFunction (
@@ -698,7 +698,7 @@ static MetadataResponse emitNominalMetadataRef(IRGenFunction &IGF,
698
698
699
699
bool irgen::isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable (
700
700
IRGenModule &IGM, NominalTypeDecl &nominal, CanType type,
701
- bool usingCanonicalSpecializedAccessor ) {
701
+ CanonicalSpecializedMetadataUsageIsOnlyFromAccessor onlyFromAccessor ) {
702
702
assert (nominal.isGenericContext ());
703
703
704
704
if (!IGM.shouldPrespecializeGenericMetadata ()) {
@@ -787,7 +787,7 @@ bool irgen::isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable(
787
787
(protocols.size () > 0 );
788
788
};
789
789
auto metadataAccessIsTrivial = [&]() {
790
- if (usingCanonicalSpecializedAccessor ) {
790
+ if (onlyFromAccessor ) {
791
791
// If an accessor is being used, then the accessor will be able to
792
792
// initialize the arguments, i.e. register classes with the ObjC
793
793
// runtime.
@@ -820,7 +820,7 @@ bool irgen::
820
820
// Struct<Klass<Int>>
821
821
// Enum<Klass<Int>>
822
822
return isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable (
823
- IGM, nominal, type, /* usingCanonicalSpecializedAccessor= */ false );
823
+ IGM, nominal, type, NotForUseOnlyFromAccessor );
824
824
}
825
825
826
826
// / Is there a known address for canonical specialized metadata? The metadata
@@ -840,7 +840,7 @@ bool irgen::isInitializableTypeMetadataStaticallyAddressable(IRGenModule &IGM,
840
840
// runtime.
841
841
// Concretely, Clazz<Klass<Int>> can be prespecialized.
842
842
return isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable (
843
- IGM, *nominal, type, /* usingCanonicalSpecializedAccessor= */ true );
843
+ IGM, *nominal, type, ForUseOnlyFromAccessor );
844
844
}
845
845
846
846
return false ;
@@ -922,7 +922,7 @@ bool irgen::shouldCacheTypeMetadataAccess(IRGenModule &IGM, CanType type) {
922
922
return true ;
923
923
if (classDecl->isGenericContext () &&
924
924
isCanonicalSpecializedNominalTypeMetadataStaticallyAddressable (
925
- IGM, *classDecl, type, /* usingCanonicalSpecializedAccessor= */ true ))
925
+ IGM, *classDecl, type, ForUseOnlyFromAccessor ))
926
926
return false ;
927
927
auto strategy = IGM.getClassMetadataStrategy (classDecl);
928
928
return strategy != ClassMetadataStrategy::Fixed ;
0 commit comments