Skip to content

Commit fb6f4be

Browse files
committed
Merge pull request #227 from LeoShimonaka/master
Fix typos in docs / comments / method name
2 parents 2f11c61 + 124c5b7 commit fb6f4be

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;

0 commit comments

Comments
 (0)