Skip to content

Commit 70e6697

Browse files
committed
Fix spelling error in documentation / comments / method name
1 parent a75fb69 commit 70e6697

File tree

18 files changed

+21
-21
lines changed

18 files changed

+21
-21
lines changed

docs/proposals/OptimizerEffects.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Introduction
2020
This document formalizes the effects that functions have on program
2121
state for the purpose of facilitating compiler optimization. By
2222
modeling more precise function effects, the optimizer can make more
23-
assumptions leading to more agressive transformation of the program.
23+
assumptions leading to more aggressive transformation of the program.
2424

2525
Function effects may be deduced by the compiler during program
2626
analyis. However, in certain situations it is helpful to directly
@@ -919,5 +919,5 @@ Generally, a default-safe policy provides a much better user model
919919
from some effects. For example, we could decide that functions cannot
920920
affect unspecified state by default. If the user accesses globals,
921921
they then need to annotate their function. However, default safety
922-
dictates that any neccessary annotations should be introduced before
922+
dictates that any necessary annotations should be introduced before
923923
declaring API stability.

docs/proposals/containers_value_type.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ <h2>
347347
<code>archives</code> is an in-out argument. And <i>just as importantly</i>,
348348
that <code>archivePath</code> is <b>not</b> to be modified within
349349
<code>_checkPathForArchiveAndAddToArray</code>. However if
350-
<code>archivePath</code> is a mutable object with reference semantics, we loose
350+
<code>archivePath</code> is a mutable object with reference semantics, we lose
351351
that ability to locally reason about this code, even in Swift.
352352
</p>
353353

docs/proposals/valref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Instance variables can be explicitly declared ``val`` or ``ref``::
150150
When a value is copied, all of its instance variables declared ``val``
151151
(implicitly or explicitly) are copied. Instance variables declared
152152
``ref`` merely have their reference counts incremented (i.e. the
153-
refrence is copied). Therefore, when the defaults are in play, the
153+
reference is copied). Therefore, when the defaults are in play, the
154154
semantic rules already defined for Swift are preserved.
155155

156156
The new rules are as follows:

include/swift/Parse/Lexer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class Lexer {
241241
}
242242

243243
/// \brief Retrieve the source location that points just past the
244-
/// end of the token refered to by \c Loc.
244+
/// end of the token referred to by \c Loc.
245245
///
246246
/// \param SM The source manager in which the given source location
247247
/// resides.

include/swift/SIL/Dominance.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class DominanceInfo : public llvm::DominatorTreeBase<SILBasicBlock> {
4141

4242
/// Return true if the other dominator tree does not match this dominator
4343
/// tree.
44-
inline bool errorOccuredOnComparison(const DominanceInfo &Other) const {
44+
inline bool errorOccurredOnComparison(const DominanceInfo &Other) const {
4545
const auto *R = getRootNode();
4646
const auto *OtherR = Other.getRootNode();
4747

@@ -131,7 +131,7 @@ class PostDominanceInfo : public llvm::DominatorTreeBase<SILBasicBlock> {
131131

132132
/// Return true if the other dominator tree does not match this dominator
133133
/// tree.
134-
inline bool errorOccuredOnComparison(const PostDominanceInfo &Other) const {
134+
inline bool errorOccurredOnComparison(const PostDominanceInfo &Other) const {
135135
const auto *R = getRootNode();
136136
const auto *OtherR = Other.getRootNode();
137137

include/swift/SILAnalysis/LoopRegionAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ class LoopRegion {
395395
llvm::SmallVector<SubregionID, 16> Subregions;
396396

397397
/// A map from RPO number of a subregion loop's preheader to a subloop
398-
/// regions id. This is neccessary since we represent a loop in the
398+
/// regions id. This is necessary since we represent a loop in the
399399
/// Subregions array by the RPO number of its header.
400400
llvm::SmallVector<std::pair<unsigned, unsigned>, 2> Subloops;
401401

lib/IRGen/GenDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ void IRGenModuleDispatcher::emitGlobalTopLevel() {
743743
}
744744

745745
void IRGenModule::finishEmitAfterTopLevel() {
746-
// Emit the implicit import of the swift standard libary.
746+
// Emit the implicit import of the swift standard library.
747747
if (DebugInfo) {
748748
std::pair<swift::Identifier, swift::SourceLoc> AccessPath[] = {
749749
{ Context.StdlibModuleName, swift::SourceLoc() }

lib/IRGen/IRGenDebugInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class IRGenDebugInfo {
100100

101101
Location LastDebugLoc; /// The last location that was emitted.
102102
const SILDebugScope *LastScope; /// The scope of that last location.
103-
bool IsLibrary; /// Whether this is a libary or a top level module.
103+
bool IsLibrary; /// Whether this is a library or a top level module.
104104
#ifndef NDEBUG
105105
/// The basic block where the location was last changed.
106106
llvm::BasicBlock *LastBasicBlock;

lib/SIL/Dominance.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void DominanceInfo::verify() const {
5555
DominanceInfo OtherDT(F);
5656

5757
// And compare.
58-
if (errorOccuredOnComparison(OtherDT)) {
58+
if (errorOccurredOnComparison(OtherDT)) {
5959
llvm::errs() << "DominatorTree is not up to date!\nComputed:\n";
6060
print(llvm::errs());
6161
llvm::errs() << "\nActual:\n";
@@ -102,7 +102,7 @@ void PostDominanceInfo::verify() const {
102102
PostDominanceInfo OtherDT(F);
103103

104104
// And compare.
105-
if (errorOccuredOnComparison(OtherDT)) {
105+
if (errorOccurredOnComparison(OtherDT)) {
106106
llvm::errs() << "PostDominatorTree is not up to date!\nComputed:\n";
107107
print(llvm::errs());
108108
llvm::errs() << "\nActual:\n";

lib/SILPasses/ARC/GlobalARCPairingAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct ARCMatchingSet {
4343
llvm::SetVector<SILInstruction *> Increments;
4444

4545
/// An insertion point for an increment means the earliest point in the
46-
/// program after the increment has occured that the increment can be moved to
46+
/// program after the increment has occurred that the increment can be moved to
4747
/// without moving the increment over an instruction that may decrement a
4848
/// reference count.
4949
llvm::SetVector<SILInstruction *> IncrementInsertPts;

lib/SILPasses/IPO/CapturePromotion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ void ReachabilityInfo::compute() {
257257
if (!Changed) {
258258
// If we have not detected a change yet, then calculate new
259259
// reachabilities into a new bit vector so we can determine if any
260-
// change has occured.
260+
// change has occurred.
261261
NewSet = CurSet;
262262
for (auto PI = BB.pred_begin(), PE = BB.pred_end(); PI != PE; ++PI) {
263263
unsigned PredID = BlockMap[*PI];

lib/SILPasses/Loop/ArrayBoundsCheckOpts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ static bool hoistBoundsChecks(SILLoop *Loop, DominanceInfo *DT, SILLoopInfo *LI,
10691069

10701070
auto *Preheader = Loop->getLoopPreheader();
10711071
if (!Preheader) {
1072-
// TODO: create one if neccessary.
1072+
// TODO: create one if necessary.
10731073
return false;
10741074
}
10751075

lib/SILPasses/Loop/COWArrayOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@ void ArrayPropertiesSpecializer::specializeLoopNest() {
22352235
auto *CheckBlock = splitBasicBlockAndBranch(B,
22362236
HoistableLoopPreheader->getTerminator(), DomTree, nullptr);
22372237

2238-
// Get the exit blocks of the orignal loop.
2238+
// Get the exit blocks of the original loop.
22392239
auto *Header = CheckBlock->getSingleSuccessor();
22402240
assert(Header);
22412241

lib/Sema/CSDiag.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2252,7 +2252,7 @@ diagnoseUnviableLookupResults(MemberLookupResult &result, Type baseObjTy,
22522252
return;
22532253
}
22542254

2255-
// In the absense of a better conversion constraint failure, point out the
2255+
// In the absence of a better conversion constraint failure, point out the
22562256
// inability to find an appropriate overload.
22572257
bool FailureDiagnosis::diagnoseGeneralOverloadFailure(Constraint *constraint) {
22582258
Constraint *bindOverload = constraint;

lib/Sema/ConstraintSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ class ConstraintSystem {
11451145

11461146
Constraint *failedConstraint = nullptr;
11471147

1148-
/// \brief Failures that occured while solving.
1148+
/// \brief Failures that occurred while solving.
11491149
///
11501150
/// FIXME: We really need to track overload sets and type variable bindings
11511151
/// to make any sense of this data. Also, it probably belongs within

lib/Serialization/DeserializeSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ SILFunction *SILDeserializer::readSILFunction(DeclID FID,
538538
// If CurrentBB is empty, just return fn. The code in readSILInstruction
539539
// assumes that such a situation means that fn is a declaration. Thus it
540540
// is using return false to mean two different things, error a failure
541-
// occured and this is a declaration. Work around that for now.
541+
// occurred and this is a declaration. Work around that for now.
542542
if (!CurrentBB)
543543
return fn;
544544

stdlib/public/stubs/Stubs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ extern "C" uint64_t swift_float80ToString(char *Buffer, size_t BufferLength,
186186
/// line. Can be NULL if no characters were read.
187187
///
188188
/// \returns Size of character data returned in \c LinePtr, or -1
189-
/// if an error occured, or EOF was reached.
189+
/// if an error occurred, or EOF was reached.
190190
extern "C" ssize_t swift_stdlib_readLine_stdin(char **LinePtr) {
191191
size_t Capacity = 0;
192192
return getline(LinePtr, &Capacity, stdin);

utils/benchmark/Richards/richards.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ struct Richards {
339339
if v2.count == 0 {
340340
return holdself()
341341
}
342-
// Orignal C impl masks with MAXINT. Why?
342+
// Original C impl masks with MAXINT. Why?
343343
if (v1.taskid & 1) == 0 {
344344
v1 = Task.Val1.TaskID(v1.taskid >> 1)
345345
return release(TIDevA)

0 commit comments

Comments
 (0)