Skip to content

Spelling irgen #42470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d12d07a
spelling: abstractable
jsoref Apr 17, 2022
f210475
spelling: across
jsoref Apr 17, 2022
a618c45
spelling: clazz
jsoref Apr 17, 2022
13fd5cb
spelling: command
jsoref Apr 17, 2022
95c41d3
spelling: components
jsoref Apr 17, 2022
1b3fedd
spelling: current
jsoref Apr 17, 2022
d9f79d9
spelling: declared
jsoref Apr 17, 2022
3e5a3ea
spelling: discrimination
jsoref Apr 17, 2022
83fe7ee
spelling: entities
jsoref Apr 17, 2022
36cc214
spelling: except
jsoref Apr 17, 2022
ee9825a
spelling: existential
jsoref Apr 17, 2022
103db5c
spelling: generic
jsoref Apr 17, 2022
c2b1744
spelling: initialization
jsoref Apr 17, 2022
e27465e
spelling: initialize
jsoref Apr 17, 2022
b92ee2b
spelling: inserted
jsoref Apr 17, 2022
8d00c9c
spelling: instantiate
jsoref Apr 17, 2022
8f0c566
spelling: instantiation
jsoref Apr 17, 2022
a830ffb
spelling: interfere
jsoref Apr 17, 2022
d77ca6a
spelling: interferes
jsoref Apr 17, 2022
6bc4085
spelling: intrinsic
jsoref Apr 17, 2022
2d1bd89
spelling: metadata
jsoref Apr 17, 2022
8fc758f
spelling: might
jsoref Apr 17, 2022
ea4833b
spelling: multiple
jsoref Apr 17, 2022
0fc0fea
spelling: necessary
jsoref Apr 17, 2022
8939c9b
spelling: objective
jsoref Apr 17, 2022
924a109
spelling: occurrences
jsoref Apr 17, 2022
eb4b3e3
spelling: outlined
jsoref Apr 17, 2022
689c49e
spelling: parameters
jsoref Apr 17, 2022
ef78d54
spelling: payload
jsoref Apr 17, 2022
2fac5bd
spelling: rearchitecting
jsoref Apr 18, 2022
17c2e03
spelling: replaceable
jsoref Apr 17, 2022
d95e28d
spelling: reverse
jsoref Apr 17, 2022
d2e5386
spelling: rewritable
jsoref Apr 17, 2022
3d70081
spelling: shareably
jsoref Apr 17, 2022
aecbae0
spelling: specializations
jsoref Apr 17, 2022
dced6f4
spelling: speedup
jsoref Apr 17, 2022
b08461f
spelling: template
jsoref Apr 17, 2022
c089b84
spelling: that
jsoref Apr 17, 2022
d2f4272
spelling: the
jsoref Apr 17, 2022
6d14926
spelling: transferred
jsoref Apr 17, 2022
72ea3f9
spelling: uninitialized
jsoref Apr 17, 2022
75d221c
spelling: witness
jsoref Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/IRGen/ClassLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Size ClassLayout::getInstanceStart() const {
return element.getByteOffset();
} else {
// We used to crash for classes that have an empty and a resilient field
// during intialization.
// during initialization.
// class CrashInInit {
// var empty = EmptyStruct()
// var resilient = ResilientThing()
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/ClassMetadataVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ template <class Impl> class ClassMetadataVisitor
// Swift class metadata.

// Super class metadata is resilient if
// the superclass is resilient when viewed from the currrent module.
// the superclass is resilient when viewed from the current module.
// But not if the current class is defined in an external module and
// not publically accessible (e.g private or internal). This would
// normally not happen except if we compile theClass's module with
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ if (Builtin.ID == BuiltinValueKind::id) { \
return;
}
if (Builtin.ID == BuiltinValueKind::AssumeAlignment) {
// A no-op pointer cast that passes on its first value. Common occurences of
// A no-op pointer cast that passes on its first value. Common occurrences of
// this builtin should already be removed with the alignment guarantee moved
// to the subsequent load or store.
//
Expand Down
6 changes: 3 additions & 3 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,10 @@ namespace {
// function type (the function to be called on returning).
void expandAsyncReturnType();

// Expand the componends for the async suspend call of the function type.
// Expand the components for the async suspend call of the function type.
void expandAsyncAwaitType();

// Expand the componends for the primary entrypoint of the async function
// Expand the components for the primary entrypoint of the async function
// type.
void expandAsyncEntryType();

Expand Down Expand Up @@ -2538,7 +2538,7 @@ class AsyncCallEmission final : public CallEmission {

auto layout = getAsyncContextLayout();

// Innitialize the async context for returning if we're not using
// Initialize the async context for returning if we're not using
// the special convention which suppresses that.
if (!getCallee().shouldPassContinuationDirectly()) {
// Set the caller context to the current context.
Expand Down
6 changes: 3 additions & 3 deletions lib/IRGen/GenCast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ llvm::Value *irgen::emitFastClassCastIfPossible(IRGenFunction &IGF,

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

// return isa_ptr == metadat_ptr ? instance : nullptr
// return isa_ptr == metadata_ptr ? instance : nullptr
llvm::Value *isEqual = IGF.Builder.CreateCmp(llvm::CmpInst::Predicate::ICMP_EQ,
lhs, rhs);
auto *instanceTy = cast<llvm::PointerType>(instance->getType());
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenClangDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ clang::Decl *getDeclWithExecutableCode(clang::Decl *decl) {
return const_cast<clang::FunctionDecl *>(definition);
}

// If this is a potentially not-yet-instanciated template, we might
// If this is a potentially not-yet-instantiated template, we might
// still have a body.
if (fd->getTemplateInstantiationPattern())
return fd;
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ ClassTypeInfo::createLayoutWithTailElems(IRGenModule &IGM,
os.str());
builder.setAsBodyOfStruct(ResultTy);

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

// FIXME: If the root class specifies its own runtime ObjC base class,
// assume that that base class ultimately inherits NSObject.
// assume that base class ultimately inherits NSObject.
if (C->getAttrs().hasAttribute<SwiftNativeObjCRuntimeBaseAttr>())
return IGM.getObjCRuntimeBaseClass(
IGM.Context.getSwiftId(KnownFoundationEntity::NSObject),
Expand Down
24 changes: 12 additions & 12 deletions lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,8 +841,8 @@ IRGenModule::getAddrOfContextDescriptorForParent(DeclContext *parent,
auto nominal = ext->getExtendedNominal();
// If the extended type is an ObjC class, it won't have a nominal type
// descriptor, so we'll just emit an extension context.
auto clas = dyn_cast<ClassDecl>(nominal);
if (!clas || clas->isForeign() || hasKnownSwiftMetadata(*this, clas)) {
auto clazz = dyn_cast<ClassDecl>(nominal);
if (!clazz || clazz->isForeign() || hasKnownSwiftMetadata(*this, clazz)) {
IRGen.noteUseOfTypeContextDescriptor(nominal, DontRequireMetadata);
return getAddrOfLLVMVariableOrGOTEquivalent(
LinkEntity::forNominalTypeDescriptor(nominal));
Expand Down Expand Up @@ -2195,7 +2195,7 @@ LinkInfo LinkInfo::get(const UniversalLinkageInfo &linkInfo,
if (const auto *MD = DC->getParentModule())
isKnownLocal = MD == swiftModule || MD->isStaticLibrary();
} else if (entity.hasSILFunction()) {
// SIL serialized entitites (functions, witness tables, vtables) do not have
// SIL serialized entities (functions, witness tables, vtables) do not have
// an associated DeclContext and are serialized into the current module. As
// a result, we explicitly handle SIL Functions here. We do not expect other
// types to be referenced directly.
Expand Down Expand Up @@ -3295,7 +3295,7 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
// rdar://problem/53836960: i386 ld64 also mis-links relative references
// to GOT entries.
// rdar://problem/59782487: issue with on-device JITd expressions.
// The JIT gets confused by private vars accessed accross object files.
// The JIT gets confused by private vars accessed across object files.
if (!IGM.getOptions().UseJIT &&
(!IGM.Triple.isOSDarwin() || IGM.Triple.getArch() != llvm::Triple::x86)) {
gotEquivalent->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
Expand Down Expand Up @@ -3707,29 +3707,29 @@ IRGenModule::getTypeEntityReference(GenericTypeDecl *decl) {
}

if (auto nominal = dyn_cast<NominalTypeDecl>(decl)) {
auto clas = dyn_cast<ClassDecl>(decl);
if (!clas || clas->isForeignReferenceType()) {
auto clazz = dyn_cast<ClassDecl>(decl);
if (!clazz || clazz->isForeignReferenceType()) {
return getTypeContextDescriptorEntityReference(*this, nominal);
}

switch (clas->getForeignClassKind()) {
switch (clazz->getForeignClassKind()) {
case ClassDecl::ForeignKind::RuntimeOnly:
return getObjCClassByNameReference(*this, clas);
return getObjCClassByNameReference(*this, clazz);

case ClassDecl::ForeignKind::CFType:
return getTypeContextDescriptorEntityReference(*this, clas);
return getTypeContextDescriptorEntityReference(*this, clazz);

case ClassDecl::ForeignKind::Normal:
if (hasKnownSwiftMetadata(*this, clas)) {
return getTypeContextDescriptorEntityReference(*this, clas);
if (hasKnownSwiftMetadata(*this, clazz)) {
return getTypeContextDescriptorEntityReference(*this, clazz);
}

// Note: we would like to use an Objective-C class reference, but the
// Darwin linker currently has a bug where it will coalesce these symbols
// *after* computing a relative offset, causing incorrect relative
// offsets in the metadata. Therefore, reference Objective-C classes by
// their runtime names.
return getObjCClassByNameReference(*this, clas);
return getObjCClassByNameReference(*this, clazz);
}
}
llvm_unreachable("bad foreign type kind");
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenDistributed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ void DistributedAccessor::emit() {
// Metadata that represents passed in the invocation decoder.
auto *decoderType = params.claimNext();

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

auto *decodeSIL = IGM.getSILModule().lookUpFunction(SILDeclRef(decodeFn));
auto *fnPtr = IGM.getAddrOfSILFunction(decodeSIL, NotForDefinition,
/*isDynamicallyReplacible=*/false);
/*isDynamicallyReplaceable=*/false);

auto methodPtr = FunctionPointer::forDirect(
classifyFunctionPointerKind(decodeSIL), fnPtr,
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenFunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,9 @@ static unsigned findSinglePartiallyAppliedParameterIndexIgnoringEmptyTypes(
IRGenFunction &IGF, CanSILFunctionType substType,
CanSILFunctionType outType) {
auto substParameters = substType->getParameters();
auto outParamters = outType->getParameters();
auto outParameters = outType->getParameters();
unsigned firstNonEmpty = -1U;
for (unsigned paramIdx = outParamters.size() ; paramIdx != substParameters.size(); ++paramIdx) {
for (unsigned paramIdx = outParameters.size() ; paramIdx != substParameters.size(); ++paramIdx) {
bool isEmpty =
isABIIgnoredParameterWithoutStorage(IGF.IGM, IGF, substType, paramIdx);
assert((isEmpty || firstNonEmpty == -1U) && "Expect at most one partially "
Expand Down
14 changes: 7 additions & 7 deletions lib/IRGen/GenMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4217,7 +4217,7 @@ namespace {
// Without this template typealias, the following errors are produced
// when compiling on Linux and Windows, respectively:
//
// template argument for template template parameter must be a class
// template argument for template parameter must be a class
// template or type alias template
//
// invalid template argument for template parameter
Expand Down Expand Up @@ -4408,7 +4408,7 @@ void irgen::emitClassMetadata(IRGenModule &IGM, ClassDecl *classDecl,

// If the class does not require dynamic initialization, or if it only
// requires dynamic initialization on a newer Objective-C runtime, add it
// to the Objctive-C class list.
// to the Objective-C class list.
if (IGM.ObjCInterop) {
switch (strategy) {
case ClassMetadataStrategy::Resilient:
Expand Down Expand Up @@ -4917,7 +4917,7 @@ namespace {
// Without this template typealias, the following errors are produced
// when compiling on Linux and Windows, respectively:
//
// template argument for template template parameter must be a class
// template argument for template parameter must be a class
// template or type alias template
//
// invalid template argument for template parameter
Expand Down Expand Up @@ -5123,7 +5123,7 @@ namespace {
// Without this template typealias, the following errors are produced
// when compiling on Linux and Windows, respectively:
//
// template argument for template template parameter must be a class
// template argument for template parameter must be a class
// template or type alias template
//
// invalid template argument for template parameter
Expand Down Expand Up @@ -5597,10 +5597,10 @@ bool irgen::requiresForeignTypeMetadata(CanType type) {
}

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

switch (clas->getForeignClassKind()) {
switch (clazz->getForeignClassKind()) {
case ClassDecl::ForeignKind::Normal:
case ClassDecl::ForeignKind::RuntimeOnly:
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenObjC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCMethodName(StringRef selector) {

/// Get or create an Objective-C selector reference. Always returns
/// an i8**. The design is that the compiler will emit a load of this
/// pointer, and the linker will ensure that that pointer is unique.
/// pointer, and the linker will ensure that pointer is unique.
llvm::Constant *IRGenModule::getAddrOfObjCSelectorRef(StringRef selector) {
// Check whether a reference for this selector already exists.
auto &entry = ObjCSelectorRefs[selector];
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenOpaque.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ StackAddress IRGenFunction::emitDynamicAlloca(llvm::Type *eltTy,
} else {
byteCount = Builder.CreateMul(arraySize, IGM.getSize(Size(eltSize)));
}
// The task allocator wants size increments in the mulitple of
// The task allocator wants size increments in the multiple of
// MaximumAlignment.
byteCount = alignUpToMaximumAlignment(IGM.SizeTy, byteCount);
auto address = emitTaskAlloc(byteCount, align);
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenPointerAuth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ static uint64_t getYieldTypesHash(IRGenModule &IGM, CanSILFunctionType type) {

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

case Kind::CoroutineYieldTypes: {
auto fnType = Storage.get<CanSILFunctionType>(StoredKind);
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenProto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ static bool isDependentConformance(
auto assocConformance =
conformance->getAssociatedConformance(req.getFirstType(), assocProtocol);

// We migh be presented with a broken AST.
// We might be presented with a broken AST.
if (assocConformance.isInvalid())
return false;

Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenThunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void IRGenModule::emitMethodLookupFunction(ClassDecl *classDecl) {
}

void noteResilientSuperclass() {}
void noteStartOfImmediateMembers(ClassDecl *clas) {}
void noteStartOfImmediateMembers(ClassDecl *clazz) {}
};

LookUpNonoverriddenMethods(IGF, classDecl, method).layout();
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ const LoadableTypeInfo &TypeConverter::getWitnessTablePtrTypeInfo() {
getSpareBitsForAlignedPointer(IGM, IGM.getWitnessTableAlignment());

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

// Create chunks of MAX_INT_BITS integer scalar types if neccessary.
// Create chunks of MAX_INT_BITS integer scalar types if necessary.
std::vector<llvm::IntegerType*> scalarTypes;
Size chunkSize = size;
auto maxChunkSize = Size(llvm::IntegerType::MAX_INT_BITS/8);
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenValueWitness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ conditionallyGetTypeLayoutEntry(IRGenModule &IGM, SILType concreteType) {
auto &typeLayoutEntry = IGM.getTypeLayoutEntry(concreteType);

// Don't use type layout based generation for layouts that contain a resilient
// field but no archetype. We don't expect a speadup by using type layout
// field but no archetype. We don't expect a speedup by using type layout
// based ir generation.
if ((typeLayoutEntry.containsResilientField() &&
!typeLayoutEntry.containsArchetypeField()) ||
Expand Down
8 changes: 4 additions & 4 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
llvm::DISubprogram *emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
SILFunctionTypeRepresentation Rep,
SILType Ty, DeclContext *DeclCtx = nullptr,
StringRef oulinedFromName = StringRef());
StringRef outlinedFromName = StringRef());
llvm::DISubprogram *emitFunction(SILFunction &SILFn, llvm::Function *Fn);
void emitArtificialFunction(IRBuilder &Builder, llvm::Function *Fn,
SILType SILTy);
Expand Down Expand Up @@ -1440,7 +1440,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
auto L = getFilenameAndLocation(*this, Decl);
auto *File = getOrCreateFile(L.filename);
// No line numbers are attached to type forward declarations. This is
// intentional: It interfers with the efficacy of incremental builds. We
// intentional: It interferes with the efficacy of incremental builds. We
// don't want a whitespace change to an secondary file trigger a
// recompilation of the debug info of a primary source file.
unsigned FwdDeclLine = 0;
Expand Down Expand Up @@ -1969,7 +1969,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
// command line. This does not include any macros defined by ClangImporter.
llvm::raw_svector_ostream OS(ConfigMacros);
unsigned I = 0;
// Translate the macro definitions back into a commmand line.
// Translate the macro definitions back into a command line.
for (auto &Macro : Opts.ClangDefines) {
if (++I > 1)
OS << ' ';
Expand Down Expand Up @@ -2796,7 +2796,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
// in the entry block of each funclet.
if (AddrDInstKind == AddrDbgInstrKind::DbgDeclare) {
// Function arguments in async functions are emitted without a shadow copy
// (that would interfer with coroutine splitting) but with a
// (that would interfere with coroutine splitting) but with a
// llvm.dbg.declare to give CoroSplit.cpp license to emit a shadow copy
// for them pointing inside the Swift Context argument that is valid
// throughout the function.
Expand Down
8 changes: 4 additions & 4 deletions lib/IRGen/IRGenMangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ IRGenMangler::withSymbolicReferences(IRGenModule &IGM,
// Classes defined in Objective-C don't have descriptors.
// TODO: We could assign a symbolic reference discriminator to refer
// to objc class refs.
if (auto clas = dyn_cast<ClassDecl>(type)) {
if (auto clazz = dyn_cast<ClassDecl>(type)) {
// Swift-defined classes can be symbolically referenced.
if (hasKnownSwiftMetadata(IGM, const_cast<ClassDecl*>(clas)))
if (hasKnownSwiftMetadata(IGM, const_cast<ClassDecl*>(clazz)))
return true;

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

// Otherwise no.
Expand Down
Loading