Skip to content

Commit 3972a13

Browse files
authored
Merge pull request swiftlang#34156 from ferologics/patch-1
Fix “descriminator” typos
2 parents a8c48d1 + b0b5468 commit 3972a13

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/IRGen/GenPointerAuth.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ PointerAuthEntity::getDeclDiscriminator(IRGenModule &IGM) const {
401401
"discriminator for foreign declaration not supported yet!");
402402

403403
// Special case: methods that are witnesses to Actor.enqueue(partialTask:)
404-
// have their own descriminator, which is shared across all actor classes.
404+
// have their own discriminator, which is shared across all actor classes.
405405
if (constant.hasFuncDecl()) {
406406
auto func = dyn_cast<FuncDecl>(constant.getFuncDecl());
407407
if (func->isActorEnqueuePartialTaskWitness()) {

lib/Serialization/Serialization.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,11 +2489,11 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
24892489

24902490
auto *storage = dyn_cast<AbstractStorageDecl>(value);
24912491
auto access = value->getFormalAccess();
2492-
// Emit the private descriminator for private decls.
2492+
// Emit the private discriminator for private decls.
24932493
// FIXME: We shouldn't need to encode this for /all/ private decls.
24942494
// In theory we can follow the same rules as mangling and only include
24952495
// the outermost private context.
2496-
bool shouldEmitPrivateDescriminator =
2496+
bool shouldEmitPrivateDiscriminator =
24972497
access <= swift::AccessLevel::FilePrivate &&
24982498
!value->getDeclContext()->isLocalContext();
24992499

@@ -2507,10 +2507,10 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
25072507
storage->getFormalAccess() >= swift::AccessLevel::Internal &&
25082508
storage->hasPrivateAccessor()));
25092509

2510-
if (shouldEmitFilenameForPrivate || shouldEmitPrivateDescriminator) {
2510+
if (shouldEmitFilenameForPrivate || shouldEmitPrivateDiscriminator) {
25112511
auto topLevelContext = value->getDeclContext()->getModuleScopeContext();
25122512
if (auto *enclosingFile = dyn_cast<FileUnit>(topLevelContext)) {
2513-
if (shouldEmitPrivateDescriminator) {
2513+
if (shouldEmitPrivateDiscriminator) {
25142514
Identifier discriminator =
25152515
enclosingFile->getDiscriminatorForPrivateValue(value);
25162516
unsigned abbrCode =

0 commit comments

Comments
 (0)