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