@@ -841,8 +841,8 @@ IRGenModule::getAddrOfContextDescriptorForParent(DeclContext *parent,
841841 auto nominal = ext->getExtendedNominal ();
842842 // If the extended type is an ObjC class, it won't have a nominal type
843843 // descriptor, so we'll just emit an extension context.
844- auto clas = dyn_cast<ClassDecl>(nominal);
845- if (!clas || clas ->isForeign () || hasKnownSwiftMetadata (*this , clas )) {
844+ auto clazz = dyn_cast<ClassDecl>(nominal);
845+ if (!clazz || clazz ->isForeign () || hasKnownSwiftMetadata (*this , clazz )) {
846846 IRGen.noteUseOfTypeContextDescriptor (nominal, DontRequireMetadata);
847847 return getAddrOfLLVMVariableOrGOTEquivalent (
848848 LinkEntity::forNominalTypeDescriptor (nominal));
@@ -2195,7 +2195,7 @@ LinkInfo LinkInfo::get(const UniversalLinkageInfo &linkInfo,
21952195 if (const auto *MD = DC->getParentModule ())
21962196 isKnownLocal = MD == swiftModule || MD->isStaticLibrary ();
21972197 } else if (entity.hasSILFunction ()) {
2198- // SIL serialized entitites (functions, witness tables, vtables) do not have
2198+ // SIL serialized entities (functions, witness tables, vtables) do not have
21992199 // an associated DeclContext and are serialized into the current module. As
22002200 // a result, we explicitly handle SIL Functions here. We do not expect other
22012201 // types to be referenced directly.
@@ -3295,7 +3295,7 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
32953295 // rdar://problem/53836960: i386 ld64 also mis-links relative references
32963296 // to GOT entries.
32973297 // rdar://problem/59782487: issue with on-device JITd expressions.
3298- // The JIT gets confused by private vars accessed accross object files.
3298+ // The JIT gets confused by private vars accessed across object files.
32993299 if (!IGM.getOptions ().UseJIT &&
33003300 (!IGM.Triple .isOSDarwin () || IGM.Triple .getArch () != llvm::Triple::x86)) {
33013301 gotEquivalent->setUnnamedAddr (llvm::GlobalValue::UnnamedAddr::Global);
@@ -3707,29 +3707,29 @@ IRGenModule::getTypeEntityReference(GenericTypeDecl *decl) {
37073707 }
37083708
37093709 if (auto nominal = dyn_cast<NominalTypeDecl>(decl)) {
3710- auto clas = dyn_cast<ClassDecl>(decl);
3711- if (!clas || clas ->isForeignReferenceType ()) {
3710+ auto clazz = dyn_cast<ClassDecl>(decl);
3711+ if (!clazz || clazz ->isForeignReferenceType ()) {
37123712 return getTypeContextDescriptorEntityReference (*this , nominal);
37133713 }
37143714
3715- switch (clas ->getForeignClassKind ()) {
3715+ switch (clazz ->getForeignClassKind ()) {
37163716 case ClassDecl::ForeignKind::RuntimeOnly:
3717- return getObjCClassByNameReference (*this , clas );
3717+ return getObjCClassByNameReference (*this , clazz );
37183718
37193719 case ClassDecl::ForeignKind::CFType:
3720- return getTypeContextDescriptorEntityReference (*this , clas );
3720+ return getTypeContextDescriptorEntityReference (*this , clazz );
37213721
37223722 case ClassDecl::ForeignKind::Normal:
3723- if (hasKnownSwiftMetadata (*this , clas )) {
3724- return getTypeContextDescriptorEntityReference (*this , clas );
3723+ if (hasKnownSwiftMetadata (*this , clazz )) {
3724+ return getTypeContextDescriptorEntityReference (*this , clazz );
37253725 }
37263726
37273727 // Note: we would like to use an Objective-C class reference, but the
37283728 // Darwin linker currently has a bug where it will coalesce these symbols
37293729 // *after* computing a relative offset, causing incorrect relative
37303730 // offsets in the metadata. Therefore, reference Objective-C classes by
37313731 // their runtime names.
3732- return getObjCClassByNameReference (*this , clas );
3732+ return getObjCClassByNameReference (*this , clazz );
37333733 }
37343734 }
37353735 llvm_unreachable (" bad foreign type kind" );
0 commit comments