Skip to content

Commit 9fa14ca

Browse files
authored
Spelling irgen (#42470)
* spelling: abstractable Signed-off-by: Josh Soref <[email protected]> * spelling: across Signed-off-by: Josh Soref <[email protected]> * spelling: clazz Signed-off-by: Josh Soref <[email protected]> * spelling: command Signed-off-by: Josh Soref <[email protected]> * spelling: components Signed-off-by: Josh Soref <[email protected]> * spelling: current Signed-off-by: Josh Soref <[email protected]> * spelling: declared Signed-off-by: Josh Soref <[email protected]> * spelling: discrimination Signed-off-by: Josh Soref <[email protected]> * spelling: entities Signed-off-by: Josh Soref <[email protected]> * spelling: except Signed-off-by: Josh Soref <[email protected]> * spelling: existential Signed-off-by: Josh Soref <[email protected]> * spelling: generic Signed-off-by: Josh Soref <[email protected]> * spelling: initialization Signed-off-by: Josh Soref <[email protected]> * spelling: initialize Signed-off-by: Josh Soref <[email protected]> * spelling: inserted Signed-off-by: Josh Soref <[email protected]> * spelling: instantiate Signed-off-by: Josh Soref <[email protected]> * spelling: instantiation Signed-off-by: Josh Soref <[email protected]> * spelling: interfere Signed-off-by: Josh Soref <[email protected]> * spelling: interferes Signed-off-by: Josh Soref <[email protected]> * spelling: intrinsic Signed-off-by: Josh Soref <[email protected]> * spelling: metadata Signed-off-by: Josh Soref <[email protected]> * spelling: might Signed-off-by: Josh Soref <[email protected]> * spelling: multiple Signed-off-by: Josh Soref <[email protected]> * spelling: necessary Signed-off-by: Josh Soref <[email protected]> * spelling: objective Signed-off-by: Josh Soref <[email protected]> * spelling: occurrences Signed-off-by: Josh Soref <[email protected]> * spelling: outlined Signed-off-by: Josh Soref <[email protected]> * spelling: parameters Signed-off-by: Josh Soref <[email protected]> * spelling: payload Signed-off-by: Josh Soref <[email protected]> * spelling: rearchitecting Signed-off-by: Josh Soref <[email protected]> * spelling: replaceable Signed-off-by: Josh Soref <[email protected]> * spelling: reverse Signed-off-by: Josh Soref <[email protected]> * spelling: rewritable Signed-off-by: Josh Soref <[email protected]> * spelling: shareably Signed-off-by: Josh Soref <[email protected]> * spelling: specializations Signed-off-by: Josh Soref <[email protected]> * spelling: speedup Signed-off-by: Josh Soref <[email protected]> * spelling: template Signed-off-by: Josh Soref <[email protected]> * spelling: that Signed-off-by: Josh Soref <[email protected]> * spelling: the Signed-off-by: Josh Soref <[email protected]> * spelling: transferred Signed-off-by: Josh Soref <[email protected]> * spelling: uninitialized Signed-off-by: Josh Soref <[email protected]> * spelling: witness Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 2afb9b7 commit 9fa14ca

28 files changed

+77
-77
lines changed

lib/IRGen/ClassLayout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Size ClassLayout::getInstanceStart() const {
5555
return element.getByteOffset();
5656
} else {
5757
// We used to crash for classes that have an empty and a resilient field
58-
// during intialization.
58+
// during initialization.
5959
// class CrashInInit {
6060
// var empty = EmptyStruct()
6161
// var resilient = ResilientThing()

lib/IRGen/ClassMetadataVisitor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ template <class Impl> class ClassMetadataVisitor
120120
// Swift class metadata.
121121

122122
// Super class metadata is resilient if
123-
// the superclass is resilient when viewed from the currrent module.
123+
// the superclass is resilient when viewed from the current module.
124124
// But not if the current class is defined in an external module and
125125
// not publically accessible (e.g private or internal). This would
126126
// normally not happen except if we compile theClass's module with

lib/IRGen/GenBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ if (Builtin.ID == BuiltinValueKind::id) { \
13361336
return;
13371337
}
13381338
if (Builtin.ID == BuiltinValueKind::AssumeAlignment) {
1339-
// A no-op pointer cast that passes on its first value. Common occurences of
1339+
// A no-op pointer cast that passes on its first value. Common occurrences of
13401340
// this builtin should already be removed with the alignment guarantee moved
13411341
// to the subsequent load or store.
13421342
//

lib/IRGen/GenCall.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,10 @@ namespace {
413413
// function type (the function to be called on returning).
414414
void expandAsyncReturnType();
415415

416-
// Expand the componends for the async suspend call of the function type.
416+
// Expand the components for the async suspend call of the function type.
417417
void expandAsyncAwaitType();
418418

419-
// Expand the componends for the primary entrypoint of the async function
419+
// Expand the components for the primary entrypoint of the async function
420420
// type.
421421
void expandAsyncEntryType();
422422

@@ -2544,7 +2544,7 @@ class AsyncCallEmission final : public CallEmission {
25442544

25452545
auto layout = getAsyncContextLayout();
25462546

2547-
// Innitialize the async context for returning if we're not using
2547+
// Initialize the async context for returning if we're not using
25482548
// the special convention which suppresses that.
25492549
if (!getCallee().shouldPassContinuationDirectly()) {
25502550
// Set the caller context to the current context.

lib/IRGen/GenCast.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ llvm::Value *irgen::emitFastClassCastIfPossible(IRGenFunction &IGF,
10721072

10731073
// TODO: we could use the ClassHierarchyAnalysis do also handle "effectively"
10741074
// final classes, e.g. not-subclassed internal classes in WMO.
1075-
// This would need some re-architecting of ClassHierarchyAnalysis to make it
1075+
// This would need some rearchitecting of ClassHierarchyAnalysis to make it
10761076
// available in IRGen.
10771077
ClassDecl *toClass = classTy->getDecl();
10781078
if (!toClass->isFinal())
@@ -1093,7 +1093,7 @@ llvm::Value *irgen::emitFastClassCastIfPossible(IRGenFunction &IGF,
10931093
IGF.IGM.getAddrOfTypeMetadataAccessFunction(targetFormalType,
10941094
NotForDefinition);
10951095
auto request = DynamicMetadataRequest(MetadataState::Complete);
1096-
// We know that we are not in a gneric class context, so we can safely
1096+
// We know that we are not in a generic class context, so we can safely
10971097
// determine that the call here does not need to take that into account.
10981098
auto response =
10991099
IGF.emitGenericTypeMetadataAccessFunctionCall(accessor, {}, request);
@@ -1106,7 +1106,7 @@ llvm::Value *irgen::emitFastClassCastIfPossible(IRGenFunction &IGF,
11061106
targetFormalType, GenericSignature(), /*suppress cast*/ true);
11071107
llvm::Value *rhs = IGF.Builder.CreateBitCast(objMetadata, IGF.IGM.Int8PtrTy);
11081108

1109-
// return isa_ptr == metadat_ptr ? instance : nullptr
1109+
// return isa_ptr == metadata_ptr ? instance : nullptr
11101110
llvm::Value *isEqual = IGF.Builder.CreateCmp(llvm::CmpInst::Predicate::ICMP_EQ,
11111111
lhs, rhs);
11121112
auto *instanceTy = cast<llvm::PointerType>(instance->getType());

lib/IRGen/GenClangDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ clang::Decl *getDeclWithExecutableCode(clang::Decl *decl) {
9191
return const_cast<clang::FunctionDecl *>(definition);
9292
}
9393

94-
// If this is a potentially not-yet-instanciated template, we might
94+
// If this is a potentially not-yet-instantiated template, we might
9595
// still have a body.
9696
if (fd->getTemplateInstantiationPattern())
9797
return fd;

lib/IRGen/GenClass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ ClassTypeInfo::createLayoutWithTailElems(IRGenModule &IGM,
452452
os.str());
453453
builder.setAsBodyOfStruct(ResultTy);
454454

455-
// Create the StructLayout, which is transfered to the caller (the caller is
455+
// Create the StructLayout, which is transferred to the caller (the caller is
456456
// responsible for deleting it).
457457
return new StructLayout(builder, classType.getClassOrBoundGenericClass(),
458458
ResultTy, builder.getElements());
@@ -2570,7 +2570,7 @@ ClassDecl *irgen::getRootClassForMetaclass(IRGenModule &IGM, ClassDecl *C) {
25702570
if (C->hasClangNode()) return C;
25712571

25722572
// FIXME: If the root class specifies its own runtime ObjC base class,
2573-
// assume that that base class ultimately inherits NSObject.
2573+
// assume that base class ultimately inherits NSObject.
25742574
if (C->getAttrs().hasAttribute<SwiftNativeObjCRuntimeBaseAttr>())
25752575
return IGM.getObjCRuntimeBaseClass(
25762576
IGM.Context.getSwiftId(KnownFoundationEntity::NSObject),

lib/IRGen/GenDecl.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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");

lib/IRGen/GenDistributed.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ void DistributedAccessor::emit() {
624624
// Metadata that represents passed in the invocation decoder.
625625
auto *decoderType = params.claimNext();
626626

627-
// If the distributed thunk is declarated in a protocol that conforms
627+
// If the distributed thunk is declared in a protocol that conforms
628628
// to `DistributedActor` protocol, there is an extract parameter that
629629
// represents a type of protocol witness.
630630
if (isa<ProtocolDecl>(actor))
@@ -815,7 +815,7 @@ ArgumentDecoderInfo DistributedAccessor::findArgumentDecoder(
815815

816816
auto *decodeSIL = IGM.getSILModule().lookUpFunction(SILDeclRef(decodeFn));
817817
auto *fnPtr = IGM.getAddrOfSILFunction(decodeSIL, NotForDefinition,
818-
/*isDynamicallyReplacible=*/false);
818+
/*isDynamicallyReplaceable=*/false);
819819

820820
auto methodPtr = FunctionPointer::forDirect(
821821
classifyFunctionPointerKind(decodeSIL), fnPtr,

lib/IRGen/GenFunc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,9 +725,9 @@ static unsigned findSinglePartiallyAppliedParameterIndexIgnoringEmptyTypes(
725725
IRGenFunction &IGF, CanSILFunctionType substType,
726726
CanSILFunctionType outType) {
727727
auto substParameters = substType->getParameters();
728-
auto outParamters = outType->getParameters();
728+
auto outParameters = outType->getParameters();
729729
unsigned firstNonEmpty = -1U;
730-
for (unsigned paramIdx = outParamters.size() ; paramIdx != substParameters.size(); ++paramIdx) {
730+
for (unsigned paramIdx = outParameters.size() ; paramIdx != substParameters.size(); ++paramIdx) {
731731
bool isEmpty =
732732
isABIIgnoredParameterWithoutStorage(IGF.IGM, IGF, substType, paramIdx);
733733
assert((isEmpty || firstNonEmpty == -1U) && "Expect at most one partially "

lib/IRGen/GenMeta.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4217,7 +4217,7 @@ namespace {
42174217
// Without this template typealias, the following errors are produced
42184218
// when compiling on Linux and Windows, respectively:
42194219
//
4220-
// template argument for template template parameter must be a class
4220+
// template argument for template parameter must be a class
42214221
// template or type alias template
42224222
//
42234223
// invalid template argument for template parameter
@@ -4408,7 +4408,7 @@ void irgen::emitClassMetadata(IRGenModule &IGM, ClassDecl *classDecl,
44084408

44094409
// If the class does not require dynamic initialization, or if it only
44104410
// requires dynamic initialization on a newer Objective-C runtime, add it
4411-
// to the Objctive-C class list.
4411+
// to the Objective-C class list.
44124412
if (IGM.ObjCInterop) {
44134413
switch (strategy) {
44144414
case ClassMetadataStrategy::Resilient:
@@ -4917,7 +4917,7 @@ namespace {
49174917
// Without this template typealias, the following errors are produced
49184918
// when compiling on Linux and Windows, respectively:
49194919
//
4920-
// template argument for template template parameter must be a class
4920+
// template argument for template parameter must be a class
49214921
// template or type alias template
49224922
//
49234923
// invalid template argument for template parameter
@@ -5123,7 +5123,7 @@ namespace {
51235123
// Without this template typealias, the following errors are produced
51245124
// when compiling on Linux and Windows, respectively:
51255125
//
5126-
// template argument for template template parameter must be a class
5126+
// template argument for template parameter must be a class
51275127
// template or type alias template
51285128
//
51295129
// invalid template argument for template parameter
@@ -5597,10 +5597,10 @@ bool irgen::requiresForeignTypeMetadata(CanType type) {
55975597
}
55985598

55995599
bool irgen::requiresForeignTypeMetadata(NominalTypeDecl *decl) {
5600-
if (auto *clas = dyn_cast<ClassDecl>(decl)) {
5601-
assert(!clas->isForeignReferenceType());
5600+
if (auto *clazz = dyn_cast<ClassDecl>(decl)) {
5601+
assert(!clazz->isForeignReferenceType());
56025602

5603-
switch (clas->getForeignClassKind()) {
5603+
switch (clazz->getForeignClassKind()) {
56045604
case ClassDecl::ForeignKind::Normal:
56055605
case ClassDecl::ForeignKind::RuntimeOnly:
56065606
return false;

lib/IRGen/GenObjC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCMethodName(StringRef selector) {
281281

282282
/// Get or create an Objective-C selector reference. Always returns
283283
/// an i8**. The design is that the compiler will emit a load of this
284-
/// pointer, and the linker will ensure that that pointer is unique.
284+
/// pointer, and the linker will ensure that pointer is unique.
285285
llvm::Constant *IRGenModule::getAddrOfObjCSelectorRef(StringRef selector) {
286286
// Check whether a reference for this selector already exists.
287287
auto &entry = ObjCSelectorRefs[selector];

lib/IRGen/GenOpaque.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ StackAddress IRGenFunction::emitDynamicAlloca(llvm::Type *eltTy,
548548
} else {
549549
byteCount = Builder.CreateMul(arraySize, IGM.getSize(Size(eltSize)));
550550
}
551-
// The task allocator wants size increments in the mulitple of
551+
// The task allocator wants size increments in the multiple of
552552
// MaximumAlignment.
553553
byteCount = alignUpToMaximumAlignment(IGM.SizeTy, byteCount);
554554
auto address = emitTaskAlloc(byteCount, align);

lib/IRGen/GenPointerAuth.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static uint64_t getYieldTypesHash(IRGenModule &IGM, CanSILFunctionType type) {
551551

552552
for (auto yield: type->getYields()) {
553553
// We can't mangle types on inout and indirect yields because they're
554-
// absractable.
554+
// abstractable.
555555
if (yield.isIndirectInOut()) {
556556
out << "inout";
557557
} else if (yield.isFormalIndirect()) {
@@ -616,7 +616,7 @@ PointerAuthEntity::getTypeDiscriminator(IRGenModule &IGM) const {
616616
case Kind::AssociatedType:
617617
case Kind::AssociatedConformance:
618618
case Kind::SILFunction:
619-
llvm_unreachable("no type for schema using type discriminiation");
619+
llvm_unreachable("no type for schema using type discrimination");
620620

621621
case Kind::CoroutineYieldTypes: {
622622
auto fnType = Storage.get<CanSILFunctionType>(StoredKind);

lib/IRGen/GenProto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ static bool isDependentConformance(
957957
auto assocConformance =
958958
conformance->getAssociatedConformance(req.getFirstType(), assocProtocol);
959959

960-
// We migh be presented with a broken AST.
960+
// We might be presented with a broken AST.
961961
if (assocConformance.isInvalid())
962962
return false;
963963

lib/IRGen/GenThunk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ void IRGenModule::emitMethodLookupFunction(ClassDecl *classDecl) {
523523
}
524524

525525
void noteResilientSuperclass() {}
526-
void noteStartOfImmediateMembers(ClassDecl *clas) {}
526+
void noteStartOfImmediateMembers(ClassDecl *clazz) {}
527527
};
528528

529529
LookUpNonoverriddenMethods(IGF, classDecl, method).layout();

lib/IRGen/GenType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ const LoadableTypeInfo &TypeConverter::getWitnessTablePtrTypeInfo() {
15261526
getSpareBitsForAlignedPointer(IGM, IGM.getWitnessTableAlignment());
15271527

15281528
// This is sub-optimal because it doesn't consider that there are
1529-
// also potential extra inhabitants in witnesss table pointers, but
1529+
// also potential extra inhabitants in witness table pointers, but
15301530
// it's what we're currently doing, so we might be stuck.
15311531
// TODO: it's likely that this never matters in the current ABI,
15321532
// so we can just switch to using AlignedRawPointerTypeInfo; but
@@ -1985,7 +1985,7 @@ TypeConverter::getOpaqueStorageTypeInfo(Size size, Alignment align) {
19851985
// scalar.
19861986
auto storageType = llvm::ArrayType::get(IGM.Int8Ty, size.getValue());
19871987

1988-
// Create chunks of MAX_INT_BITS integer scalar types if neccessary.
1988+
// Create chunks of MAX_INT_BITS integer scalar types if necessary.
19891989
std::vector<llvm::IntegerType*> scalarTypes;
19901990
Size chunkSize = size;
19911991
auto maxChunkSize = Size(llvm::IntegerType::MAX_INT_BITS/8);

lib/IRGen/GenValueWitness.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ conditionallyGetTypeLayoutEntry(IRGenModule &IGM, SILType concreteType) {
440440
auto &typeLayoutEntry = IGM.getTypeLayoutEntry(concreteType);
441441

442442
// Don't use type layout based generation for layouts that contain a resilient
443-
// field but no archetype. We don't expect a speadup by using type layout
443+
// field but no archetype. We don't expect a speedup by using type layout
444444
// based ir generation.
445445
if ((typeLayoutEntry.containsResilientField() &&
446446
!typeLayoutEntry.containsArchetypeField()) ||

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
208208
llvm::DISubprogram *emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
209209
SILFunctionTypeRepresentation Rep,
210210
SILType Ty, DeclContext *DeclCtx = nullptr,
211-
StringRef oulinedFromName = StringRef());
211+
StringRef outlinedFromName = StringRef());
212212
llvm::DISubprogram *emitFunction(SILFunction &SILFn, llvm::Function *Fn);
213213
void emitArtificialFunction(IRBuilder &Builder, llvm::Function *Fn,
214214
SILType SILTy);
@@ -1440,7 +1440,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
14401440
auto L = getFilenameAndLocation(*this, Decl);
14411441
auto *File = getOrCreateFile(L.filename);
14421442
// No line numbers are attached to type forward declarations. This is
1443-
// intentional: It interfers with the efficacy of incremental builds. We
1443+
// intentional: It interferes with the efficacy of incremental builds. We
14441444
// don't want a whitespace change to an secondary file trigger a
14451445
// recompilation of the debug info of a primary source file.
14461446
unsigned FwdDeclLine = 0;
@@ -1969,7 +1969,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
19691969
// command line. This does not include any macros defined by ClangImporter.
19701970
llvm::raw_svector_ostream OS(ConfigMacros);
19711971
unsigned I = 0;
1972-
// Translate the macro definitions back into a commmand line.
1972+
// Translate the macro definitions back into a command line.
19731973
for (auto &Macro : Opts.ClangDefines) {
19741974
if (++I > 1)
19751975
OS << ' ';
@@ -2796,7 +2796,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
27962796
// in the entry block of each funclet.
27972797
if (AddrDInstKind == AddrDbgInstrKind::DbgDeclare) {
27982798
// Function arguments in async functions are emitted without a shadow copy
2799-
// (that would interfer with coroutine splitting) but with a
2799+
// (that would interfere with coroutine splitting) but with a
28002800
// llvm.dbg.declare to give CoroSplit.cpp license to emit a shadow copy
28012801
// for them pointing inside the Swift Context argument that is valid
28022802
// throughout the function.

lib/IRGen/IRGenMangler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ IRGenMangler::withSymbolicReferences(IRGenModule &IGM,
116116
// Classes defined in Objective-C don't have descriptors.
117117
// TODO: We could assign a symbolic reference discriminator to refer
118118
// to objc class refs.
119-
if (auto clas = dyn_cast<ClassDecl>(type)) {
119+
if (auto clazz = dyn_cast<ClassDecl>(type)) {
120120
// Swift-defined classes can be symbolically referenced.
121-
if (hasKnownSwiftMetadata(IGM, const_cast<ClassDecl*>(clas)))
121+
if (hasKnownSwiftMetadata(IGM, const_cast<ClassDecl*>(clazz)))
122122
return true;
123123

124124
// Foreign class types can be symbolically referenced.
125-
if (clas->getForeignClassKind() == ClassDecl::ForeignKind::CFType ||
126-
const_cast<ClassDecl *>(clas)->isForeignReferenceType())
125+
if (clazz->getForeignClassKind() == ClassDecl::ForeignKind::CFType ||
126+
const_cast<ClassDecl *>(clazz)->isForeignReferenceType())
127127
return true;
128128

129129
// Otherwise no.

0 commit comments

Comments
 (0)