Skip to content

Commit 6e3b700

Browse files
Fix typos.
1 parent 2bfb788 commit 6e3b700

28 files changed

+45
-45
lines changed

Diff for: include/swift/AST/ArchetypeBuilder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class ArchetypeBuilder {
176176
void visitPotentialArchetypes(F f);
177177

178178
public:
179-
/// Construct a new archtype builder.
179+
/// Construct a new archetype builder.
180180
///
181181
/// \param mod The module in which the builder will create archetypes.
182182
///

Diff for: include/swift/AST/GenericSignature.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class GenericSignature : public llvm::FoldingSetNode {
101101
NumGenericParams };
102102
}
103103

104-
/// Retrieve a mutable verison of the requirements.
104+
/// Retrieve a mutable version of the requirements.
105105
MutableArrayRef<Requirement> getRequirementsBuffer() {
106106
void *genericParams = getGenericParamsBuffer().end();
107107
return { reinterpret_cast<Requirement *>(genericParams),

Diff for: include/swift/Runtime/Metadata.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct OpaqueValue;
9393
/// A buffer can be in one of three states:
9494
/// - An unallocated buffer has a completely unspecified state.
9595
/// - An allocated buffer has been initialized so that it
96-
/// owns unintialized value storage for the stored type.
96+
/// owns uninitialized value storage for the stored type.
9797
/// - An initialized buffer is an allocated buffer whose value
9898
/// storage has been initialized.
9999
struct ValueBuffer {
@@ -247,9 +247,9 @@ typedef void destroyBuffer(ValueBuffer *buffer, const Metadata *self);
247247
/// Given an unallocated buffer, initialize it as a copy of the
248248
/// object in the source buffer. This can be decomposed as:
249249
///
250-
/// self->initalizeBufferWithCopy(dest, self->projectBuffer(src), self)
250+
/// self->initializeBufferWithCopy(dest, self->projectBuffer(src), self)
251251
///
252-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
252+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
253253
///
254254
/// Preconditions:
255255
/// 'dest' is an unallocated buffer
@@ -305,7 +305,7 @@ typedef OpaqueValue *initializeBufferWithCopy(ValueBuffer *dest,
305305
/// Given an uninitialized object and an initialized object, copy
306306
/// the value.
307307
///
308-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
308+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
309309
///
310310
/// Returns the dest object.
311311
///
@@ -322,7 +322,7 @@ typedef OpaqueValue *initializeWithCopy(OpaqueValue *dest,
322322
/// Given two initialized objects, copy the value from one to the
323323
/// other.
324324
///
325-
/// This operation must be safe aginst 'dest' and 'src' aliasing.
325+
/// This operation must be safe against 'dest' and 'src' aliasing.
326326
///
327327
/// Returns the dest object.
328328
///
@@ -337,7 +337,7 @@ typedef OpaqueValue *assignWithCopy(OpaqueValue *dest,
337337
/// the value from the object to the buffer, leaving the source object
338338
/// uninitialized.
339339
///
340-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
340+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
341341
///
342342
/// Returns the dest object.
343343
///
@@ -359,7 +359,7 @@ typedef OpaqueValue *initializeBufferWithTake(ValueBuffer *dest,
359359
/// can simply be a pointer-aligned memcpy of sizeof(ValueBuffer)
360360
/// bytes.
361361
///
362-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
362+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
363363
///
364364
/// Returns the dest object.
365365
///
@@ -377,7 +377,7 @@ typedef OpaqueValue *initializeWithTake(OpaqueValue *dest,
377377
/// the value from one to the other, leaving the source object
378378
/// uninitialized.
379379
///
380-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
380+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
381381
/// Therefore this can be decomposed as:
382382
///
383383
/// self->destroy(dest, self);
@@ -411,10 +411,10 @@ typedef OpaqueValue *allocateBuffer(ValueBuffer *buffer,
411411
/// value from one buffer to the other, leaving the source buffer
412412
/// unallocated.
413413
///
414-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
414+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
415415
/// Therefore this can be decomposed as:
416416
///
417-
/// self->initalizeBufferWithTake(dest, self->projectBuffer(src), self)
417+
/// self->initializeBufferWithTake(dest, self->projectBuffer(src), self)
418418
/// self->deallocateBuffer(src, self)
419419
///
420420
/// However, it may be more efficient because values stored out-of-line
@@ -447,7 +447,7 @@ typedef void destroyArray(OpaqueValue *array, size_t n,
447447
/// Given an uninitialized array and an initialized array, copy
448448
/// the value.
449449
///
450-
/// This operation does not need to be safe aginst 'dest' and 'src' aliasing.
450+
/// This operation does not need to be safe against 'dest' and 'src' aliasing.
451451
///
452452
/// Returns the dest object.
453453
///

Diff for: include/swift/SILOptimizer/Analysis/EscapeAnalysis.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
736736
bool canEscapeTo(SILValue V, RefCountingInst *RI);
737737

738738
/// Returns true if the value \p V can escape to any other pointer \p To.
739-
/// This means that either \p To is the same as \p V or containes a reference
739+
/// This means that either \p To is the same as \p V or contains a reference
740740
/// to \p V.
741741
bool canEscapeToValue(SILValue V, SILValue To);
742742

Diff for: lib/AST/Mangle.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static void bindAllGenericParameters(Mangler &mangler,
446446
}
447447

448448
void Mangler::mangleTypeForDebugger(Type Ty, const DeclContext *DC) {
449-
assert(DWARFMangling && "DWARFMangling expected whn mangling for debugger");
449+
assert(DWARFMangling && "DWARFMangling expected when mangling for debugger");
450450

451451
// Polymorphic function types carry their own generic parameters and
452452
// manglePolymorphicType will bind them.

Diff for: lib/ClangImporter/ImportDecl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -747,10 +747,10 @@ makeUnionFieldAccessors(ClangImporter::Implementation &Impl,
747747
C, C.getIdentifier("initialize")));
748748
auto initializeFnRef
749749
= new (C) DeclRefExpr(initializeFn, SourceLoc(), /*implicit*/ true);
750-
auto initalizeArgs = TupleExpr::createImplicit(C,
750+
auto initializeArgs = TupleExpr::createImplicit(C,
751751
{ newValueRef, selfPointer },
752752
{});
753-
auto initialize = new (C) CallExpr(initializeFnRef, initalizeArgs,
753+
auto initialize = new (C) CallExpr(initializeFnRef, initializeArgs,
754754
/*implicit*/ true);
755755
auto body = BraceStmt::create(C, SourceLoc(), { initialize }, SourceLoc(),
756756
/*implicit*/ true);

Diff for: lib/IDE/Utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ SourceCompleteResult ide::isSourceInputComplete(StringRef Text) {
189189
}
190190

191191
// Adjust the cc1 triple string we got from clang, to make sure it will be
192-
// accepted when it goes throught the swift clang importer.
192+
// accepted when it goes through the swift clang importer.
193193
static std::string adjustClangTriple(StringRef TripleStr) {
194194
std::string Result;
195195
llvm::raw_string_ostream OS(Result);

Diff for: lib/IRGen/GenFunc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ if (Builtin.ID == BuiltinValueKind::id) { \
18301830
return; \
18311831
}
18321832
// FIXME: We could generate the code to dynamically report the overflow if the
1833-
// thrid argument is true. Now, we just ignore it.
1833+
// third argument is true. Now, we just ignore it.
18341834

18351835
#define BUILTIN_BINARY_PREDICATE(id, name, attrs, overload) \
18361836
if (Builtin.ID == BuiltinValueKind::id) \

Diff for: lib/IRGen/NonFixedTypeInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// statically.
1616
//
1717
// These classes are useful only for creating TypeInfo
18-
// implementations; unlike the similiarly-named FixedTypeInfo, they
18+
// implementations; unlike the similarly-named FixedTypeInfo, they
1919
// do not provide a supplemental API.
2020
//
2121
//===----------------------------------------------------------------------===//

Diff for: lib/IRGen/ValueWitness.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ enum class ValueWitness : unsigned {
8383
/// T *(*initializeBufferWithCopyOfBuffer)(B *dest, B *src, M *self);
8484
/// Given an invalid buffer, initialize it as a copy of the
8585
/// object in the source buffer. This can be decomposed as:
86-
/// initalizeBufferWithCopy(dest, self->projectBuffer(src), self)
86+
/// initializeBufferWithCopy(dest, self->projectBuffer(src), self)
8787
InitializeBufferWithCopyOfBuffer,
8888

8989
/// T *(*projectBuffer)(B *buffer, M *self);
@@ -156,7 +156,7 @@ enum class ValueWitness : unsigned {
156156
/// T *(*initializeBufferWithTakeOfBuffer)(B *dest, B *src, M *self);
157157
/// Given an invalid buffer, initialize it by taking the value out of
158158
/// the source buffer. This can be (inefficiently) decomposed as:
159-
/// initalizeBufferWithTake(dest, self->projectBuffer(src), self)
159+
/// initializeBufferWithTake(dest, self->projectBuffer(src), self)
160160
/// deallocateBuffer(src, self)
161161
InitializeBufferWithTakeOfBuffer,
162162

Diff for: lib/LLVMPasses/LLVMARCOpts.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ static bool performLocalRetainUnownedOpt(CallInst *Retain, BasicBlock &BB,
856856
}
857857

858858
/// Removes redundant check_unowned calls if they check the same reference and
859-
/// there is no instruction inbetween which could decrement the reference count.
859+
/// there is no instruction in between which could decrement the reference count.
860860
static void performRedundantCheckUnownedRemoval(BasicBlock &BB) {
861861
DenseSet<Value *> checkedValues;
862862
for (BasicBlock::iterator BBI = BB.begin(), E = BB.end(); BBI != E; ) {

Diff for: lib/Parse/ParseStmt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ ParserResult<Stmt> Parser::parseStmtReturn(SourceLoc tryLoc) {
700700
ParserResult<Expr> Result = parseExpr(diag::expected_expr_return);
701701
if (Result.isNull()) {
702702
// Create an ErrorExpr to tell the type checker that this return
703-
// statement had an expression argument in the source. This supresses
703+
// statement had an expression argument in the source. This suppresses
704704
// the error about missing return value in a non-void function.
705705
Result = makeParserErrorResult(new (Context) ErrorExpr(ExprLoc));
706706
}

Diff for: lib/SILOptimizer/IPO/GlobalOpt.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ static bool isAssignedOnlyOnceInInitializer(SILGlobalVariable *SILG) {
549549
return false;
550550
}
551551

552-
/// Replace load sequence which may contian
552+
/// Replace load sequence which may contain
553553
/// a chain of struct_element_addr followed by a load.
554554
/// The sequence is traversed starting from the load
555555
/// instruction.

Diff for: lib/SILOptimizer/Mandatory/ConstantPropagation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ constantFoldAndCheckIntegerConversions(BuiltinInst *BI,
481481
// 2048. Is there a better way to identify conversions from literals?
482482
bool Literal = (SrcBitWidth == 2048);
483483

484-
// FIXME: This will prevent hard error in cases the error is comming
484+
// FIXME: This will prevent hard error in cases the error is coming
485485
// from ObjC interoperability code. Currently, we treat NSUInteger as
486486
// Int.
487487
if (Loc.getSourceLoc().isInvalid()) {

Diff for: lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ SILCombiner::visitInjectEnumAddrInst(InjectEnumAddrInst *IEAI) {
666666
if (SI->getDest() == IEAI->getOperand())
667667
return nullptr;
668668
}
669-
// Allow all instructions inbetween, which don't have any dependency to
669+
// Allow all instructions in between, which don't have any dependency to
670670
// the store.
671671
if (AA->mayWriteToMemory(&*II, IEAI->getOperand()))
672672
return nullptr;
@@ -705,7 +705,7 @@ SILCombiner::visitInjectEnumAddrInst(InjectEnumAddrInst *IEAI) {
705705
if (SI->getDest() == IEAI->getOperand())
706706
return nullptr;
707707
}
708-
// Allow all instructions inbetween, which don't have any dependency to
708+
// Allow all instructions in between, which don't have any dependency to
709709
// the store.
710710
if (AA->mayWriteToMemory(&*II, IEAI->getOperand()))
711711
return nullptr;

Diff for: lib/SILOptimizer/Transforms/SILCodeMotion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ static bool isRetainAvailableInSomeButNotAllPredecessors(
898898
// Check that there is no decrement or check from the increment to the end
899899
// of the basic block. After we have hoisted the first release this release
900900
// would prevent further hoisting. Instead we check that no decrement or
901-
// check occurs upto this hoisted release.
901+
// check occurs up to this hoisted release.
902902
auto End = CheckUpToInstruction[Pred];
903903
auto EndIt = SILBasicBlock::iterator(End ? *End : Pred->getTerminator());
904904
if (Retain == Pred->rend() || valueHasARCDecrementOrCheckInInstructionRange(

Diff for: lib/SILOptimizer/Utils/Local.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,7 @@ swift::analyzeStaticInitializer(SILValue V,
22992299
return false;
23002300
}
23012301

2302-
/// Replace load sequence which may contian
2302+
/// Replace load sequence which may contain
23032303
/// a chain of struct_element_addr followed by a load.
23042304
/// The sequence is travered inside out, i.e.
23052305
/// starting with the innermost struct_element_addr

Diff for: lib/SILOptimizer/Utils/SILSSAUpdater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ SILValue SILSSAUpdater::GetValueInMiddleOfBlock(SILBasicBlock *BB) {
175175
bool FirstPred = true;
176176

177177
// SSAupdater can modify TerminatorInst and therefore invalidate the
178-
// predecessor iterator. Find all the predecesors before the SSA update.
178+
// predecessor iterator. Find all the predecessors before the SSA update.
179179
SmallVector<SILBasicBlock *, 4> Preds;
180180
for (auto *PredBB: BB->getPreds()) {
181181
Preds.push_back(PredBB);

Diff for: stdlib/public/core/StringBuffer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public struct _StringBuffer {
186186
/// Attempt to claim unused capacity in the buffer.
187187
///
188188
/// Operation succeeds if there is sufficient capacity, and either:
189-
/// - the buffer is uniquely-refereced, or
189+
/// - the buffer is uniquely-referenced, or
190190
/// - `oldUsedEnd` points to the end of the currently used capacity.
191191
///
192192
/// - parameter subRange: Range of the substring that the caller tries

Diff for: stdlib/public/core/UnavailableStringAPIs.swift.gyb

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ stringSubscriptComment = """
3838
/// Use this API when you are performing low-level manipulation
3939
/// of character data.
4040
///
41-
/// - `String.chracters` is a collection of extended grapheme
41+
/// - `String.characters` is a collection of extended grapheme
4242
/// clusters, which are an approximation of user-perceived
4343
/// characters.
4444
///
@@ -98,7 +98,7 @@ ${stringSubscriptComment}
9898
/// Unicode scalars in the string. Use this API when you are
9999
/// performing low-level manipulation of character data.
100100
///
101-
/// - `String.chracters.count` property returns the number of
101+
/// - `String.characters.count` property returns the number of
102102
/// extended grapheme clusters. Use this API to count the
103103
/// number of user-perceived characters in the string.
104104
@available(

Diff for: stdlib/public/core/UnsafePointer.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ ${comment}
164164
///
165165
/// - Precondition: The memory is not initialized.
166166
///
167-
/// - Postcondition: The memory is initalized; the value should eventually
167+
/// - Postcondition: The memory is initialized; the value should eventually
168168
/// be destroyed or moved from to avoid leaks.
169169
public func initialize(newvalue: Memory) {
170170
Builtin.initialize(newvalue, _rawValue)

Diff for: test/Interpreter/SDK/missing_imports_repl.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import MapKit
1515
let x = MKMapRectMake(0.0, 1.0, 2.0, 3.0)
1616
// CHECK-NEXT: x : MKMapRect
1717

18-
import Nonexistant_Module_Name
19-
// CHECK-ERROR: error: no such module 'Nonexistant_Module_Name'
18+
import Nonexistent_Module_Name
19+
// CHECK-ERROR: error: no such module 'Nonexistent_Module_Name'
2020

21-
import SpriteKit.Nonexistant_Submodule
21+
import SpriteKit.Nonexistent_Submodule
2222
// CHECK-ERROR: error: no such module
2323

2424
SKScene()

Diff for: test/SILOptimizer/definite_init_diagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func test4() {
145145
markUsed(t3.2)
146146

147147

148-
// Partially set, wholey read.
148+
// Partially set, wholly read.
149149
var t4 : (Int, Int, Int) // expected-note 1 {{variable defined here}}
150150
t4.0 = 1; t4.2 = 42
151151
_ = t4 // expected-error {{variable 't4.1' used before being initialized}}

Diff for: test/SILOptimizer/globalarcopts_rcidentityanalysis.sil

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ bb6(%4 : $FakeOptional<Builtin.NativeObject>):
287287
return %9999 : $()
288288
}
289289

290-
// CHECK-LABEL: sil @silargument_dont_strip_over_relevent_loop : $@convention(thin) (FakeOptional<Builtin.NativeObject>) -> () {
290+
// CHECK-LABEL: sil @silargument_dont_strip_over_relevant_loop : $@convention(thin) (FakeOptional<Builtin.NativeObject>) -> () {
291291
// CHECK: retain_value
292292
// CHECK: release_value
293-
sil @silargument_dont_strip_over_relevent_loop : $@convention(thin) (FakeOptional<Builtin.NativeObject>) -> () {
293+
sil @silargument_dont_strip_over_relevant_loop : $@convention(thin) (FakeOptional<Builtin.NativeObject>) -> () {
294294
bb0(%0 : $FakeOptional<Builtin.NativeObject>):
295295
switch_enum %0 : $FakeOptional<Builtin.NativeObject>, case #FakeOptional.Some!enumelt.1: bb1, case #FakeOptional.None!enumelt: bb2
296296

Diff for: test/SILOptimizer/linker.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// CHECK: sil public_external [fragile] @_TFs11doSomethingFT_T_ : $@convention(thin) () -> () {
77
doSomething()
88

9-
// Make sure we are not linking doSomethign2 because it is marked with 'noimport'
9+
// Make sure we are not linking doSomething2 because it is marked with 'noimport'
1010

1111
// CHECK: sil [_semantics "stdlib_binary_only"] @_TFs12doSomething2FT_T_ : $@convention(thin) () -> ()
1212
// CHECK-NOT: return

Diff for: test/decl/import/import.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func f1(a: Swift.Int) -> Swift.Void { print(a) }
2727
import func Swift.print
2828

2929
// rdar://14418336
30-
#import something_nonexistant // expected-error {{expected expression}} expected-error {{no such module 'something_nonexistant'}}
30+
#import something_nonexistent // expected-error {{expected expression}} expected-error {{no such module 'something_nonexistent'}}
3131

3232
// Import specific decls
3333
import typealias Swift.Int

Diff for: tools/SourceKit/tools/sourcekitd/include/sourcekitd/sourcekitd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ typedef void(^sourcekitd_interrupted_connection_handler_t)(void);
122122

123123
/**
124124
* \brief Sets the handler which should be called whenever the connection to
125-
* SourceKit is interupted.
125+
* SourceKit is interrupted.
126126
*
127127
* The handler should reestablish any necessary state, such as re-opening any
128128
* documents which were open before the connection was interrupted.

Diff for: utils/build-script-impl

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ LLVM_TARGETS_TO_BUILD="X86;ARM;AArch64"
5151
# components).
5252
#
5353
# Each variable name is re-exported into this script in uppercase, where dashes
54-
# are substituded by underscores. For example, `swift-install-components` is
54+
# are substituted by underscores. For example, `swift-install-components` is
5555
# referred to as `SWIFT_INSTALL_COMPONENTS` in the remainder of this script.
5656
KNOWN_SETTINGS=(
5757
# name default description

0 commit comments

Comments
 (0)