Skip to content

Commit f92e90a

Browse files
committed
Merge pull request #2902 from practicalswift/typo-fixes-20160605
[gardening] Fix recently introduced typos.
2 parents 49d7865 + 8df3859 commit f92e90a

File tree

18 files changed

+41
-41
lines changed

18 files changed

+41
-41
lines changed

include/swift/SILOptimizer/Analysis/ARCAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class ConsumedArgToEpilogueReleaseMatcher {
243243
return false;
244244
}
245245

246-
/// Return true if we've found some epilgoue releases for the argument
246+
/// Return true if we've found some epilogue releases for the argument
247247
/// but not all.
248248
bool hasSomeReleasesForArgument(SILArgument *Arg) {
249249
return FoundSomeReleases.find(Arg) != FoundSomeReleases.end();

lib/IRGen/GenMeta.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ createInPlaceMetadataInitializationFunction(IRGenModule &IGM,
12261226
IGM.DebugInfo->emitArtificialFunction(IGF, fn);
12271227

12281228
// Skip instrumentation when building for TSan to avoid false positives.
1229-
// The syncronization for this happens in the Runtime and we do not see it.
1229+
// The synchronization for this happens in the Runtime and we do not see it.
12301230
if (IGM.IRGen.Opts.Sanitize == SanitizerKind::Thread)
12311231
fn->removeFnAttr(llvm::Attribute::SanitizeThread);
12321232

@@ -2895,7 +2895,7 @@ namespace {
28952895
IRGenFunction IGF(IGM, f);
28962896

28972897
// Skip instrumentation when building for TSan to avoid false positives.
2898-
// The syncronization for this happens in the Runtime and we do not see it.
2898+
// The synchronization for this happens in the Runtime and we do not see it.
28992899
if (IGM.IRGen.Opts.Sanitize == SanitizerKind::Thread)
29002900
f->removeFnAttr(llvm::Attribute::SanitizeThread);
29012901

lib/IRGen/GenProto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ void IRGenModule::emitSILWitnessTable(SILWitnessTable *wt) {
16071607
return;
16081608

16091609
// Don't emit a witness table that is available externally.
1610-
// It can end up in having duplicate sumbols for generated associated type
1610+
// It can end up in having duplicate symbols for generated associated type
16111611
// metadata access functions.
16121612
// Also, it is not a big benefit for LLVM to emit such witness tables.
16131613
if (isAvailableExternally(wt->getLinkage()))

lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,7 @@ int LifetimeChecker::getAnyUninitializedMemberAtInst(SILInstruction *Inst,
24132413
// Determine the liveness states of the elements that we care about.
24142414
auto Liveness = getLivenessAtInst(Inst, FirstElt, NumElts);
24152415

2416-
// Find unintialized member.
2416+
// Find uninitialized member.
24172417
for (unsigned i = FirstElt, e = i+NumElts; i != e; ++i)
24182418
if (Liveness.get(i) != DIKind::Yes)
24192419
return i;

lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ using SILParameterInfoList = llvm::SmallVector<SILParameterInfo, 8>;
5959
using ArgumentIndexMap = llvm::SmallDenseMap<int, int>;
6060

6161
//===----------------------------------------------------------------------===//
62-
// Utilties
62+
// Utilities
6363
//===----------------------------------------------------------------------===//
6464

6565
/// Return the single apply found in this function.
@@ -112,10 +112,10 @@ class FunctionSignatureTransform {
112112
// Keep tracks to argument mapping.
113113
ArgumentIndexMap &AIM;
114114

115-
// Self arument is modified.
115+
// Self argument is modified.
116116
bool shouldModifySelfArgument;
117117

118-
/// Keep a "view" of precompiled information on argumentis that we use
118+
/// Keep a "view" of precompiled information on arguments that we use
119119
/// during our optimization.
120120
llvm::SmallVector<ArgumentDescriptor, 4> &ArgumentDescList;
121121

@@ -171,7 +171,7 @@ class FunctionSignatureTransform {
171171
return Params || Result;
172172
}
173173

174-
/// Do the actual owned to guaranteeed transformations.
174+
/// Do the actual owned to guaranteed transformations.
175175
void OwnedToGuaranteedTransform() {
176176
OwnedToGuaranteedTransformFunctionResults();
177177
OwnedToGuaranteedTransformFunctionParameters();
@@ -323,7 +323,7 @@ std::string FunctionSignatureTransform::createOptimizedSILFunctionName() {
323323

324324
/// Compute what the function interface will look like based on the
325325
/// optimization we are doing on the given argument descriptor. Default
326-
/// implemenation simply passes it through.
326+
/// implementation simply passes it through.
327327
void
328328
FunctionSignatureTransform::
329329
computeOptimizedArgInterface(ArgumentDescriptor &AD, SILParameterInfoList &Out) {

lib/Sema/TypeCheckExpr.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,13 +1243,13 @@ void TypeChecker::computeCaptures(AnyFunctionRef AFR) {
12431243

12441244
if (inoutCount > 0) {
12451245
if (auto e = AFR.getAbstractFunctionDecl()) {
1246-
for (auto returnOccurance: getEscapingFunctionAsReturnValue(e)) {
1247-
diagnose(returnOccurance->getReturnLoc(),
1246+
for (auto returnOccurrence: getEscapingFunctionAsReturnValue(e)) {
1247+
diagnose(returnOccurrence->getReturnLoc(),
12481248
diag::nested_function_escaping_inout_capture);
12491249
}
1250-
auto occurances = getEscapingFunctionAsArgument(e);
1251-
for (auto occurance: occurances) {
1252-
diagnose(occurance->getLoc(),
1250+
auto occurrences = getEscapingFunctionAsArgument(e);
1251+
for (auto occurrence: occurrences) {
1252+
diagnose(occurrence->getLoc(),
12531253
diag::nested_function_with_implicit_capture_argument,
12541254
inoutCount > 1);
12551255
}

lib/Sema/TypeChecker.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,33 +517,33 @@ class TypeChecker final : public LazyResolver {
517517
llvm::DenseMap<AbstractFunctionDecl *, llvm::DenseSet<ReturnStmt *>>
518518
FunctionAsReturnValue;
519519

520-
/// Function apply expressions with a certain function as an arugment.
520+
/// Function apply expressions with a certain function as an argument.
521521
llvm::DenseMap<AbstractFunctionDecl *, llvm::DenseSet<ApplyExpr *>>
522522
FunctionAsEscapingArg;
523523

524524
public:
525-
/// Record an occurence of a function that captures inout values as an
525+
/// Record an occurrence of a function that captures inout values as an
526526
/// argument.
527527
///
528-
/// \param decl the function that occurs as an arugment.
528+
/// \param decl the function that occurs as an argument.
529529
///
530530
/// \param apply the expression in which the function appears.
531531
void addEscapingFunctionAsArgument(AbstractFunctionDecl *decl,
532532
ApplyExpr *apply) {
533533
FunctionAsEscapingArg[decl].insert(apply);
534534
}
535535

536-
/// Find occurences of a function that captures inout values as arguments.
536+
/// Find occurrences of a function that captures inout values as arguments.
537537
///
538-
/// \param decl the function that occurs as an arugment.
538+
/// \param decl the function that occurs as an argument.
539539
///
540540
/// \returns Expressions in which the function appears as arguments.
541541
llvm::DenseSet<ApplyExpr *> &
542542
getEscapingFunctionAsArgument(AbstractFunctionDecl *decl) {
543543
return FunctionAsEscapingArg[decl];
544544
}
545545

546-
/// Record an occurence of a function that captures inout values as a return
546+
/// Record an occurrence of a function that captures inout values as a return
547547
/// value
548548
///
549549
/// \param decl the function that occurs as a return value.
@@ -554,7 +554,7 @@ class TypeChecker final : public LazyResolver {
554554
FunctionAsReturnValue[decl].insert(stmt);
555555
}
556556

557-
/// Find occurences of a function that captures inout values as return
557+
/// Find occurrences of a function that captures inout values as return
558558
/// values.
559559
///
560560
/// \param decl the function that occurs as a return value.

stdlib/public/Platform/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ foreach(sdk ${SWIFT_SDKS})
4040

4141
# Determine the location of glibc headers based on the target.
4242
set(GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH "/usr/include")
43-
set(GLIBC_SYSROOT_REALTIVE_ARCH_INCLUDE_PATH ${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH})
43+
set(GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH ${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH})
4444

4545
# Some SDKs place their headers in architecture-specific subfolders.
4646
if((${sdk} STREQUAL "LINUX" OR ${sdk} STREQUAL "FREEBSD") AND CMAKE_LIBRARY_ARCHITECTURE)
47-
set(GLIBC_SYSROOT_REALTIVE_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_REALTIVE_ARCH_INCLUDE_PATH}/${CMAKE_LIBRARY_ARCHITECTURE}")
47+
set(GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}/${CMAKE_LIBRARY_ARCHITECTURE}")
4848
endif()
4949

5050
set(GLIBC_INCLUDE_PATH "${SWIFT_SDK_${sdk}_PATH}/${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}")
51-
set(GLIBC_ARCH_INCLUDE_PATH "${SWIFT_SDK_${sdk}_PATH}/${GLIBC_SYSROOT_REALTIVE_ARCH_INCLUDE_PATH}")
51+
set(GLIBC_ARCH_INCLUDE_PATH "${SWIFT_SDK_${sdk}_PATH}/${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}")
5252

5353
set(glibc_modulemap_source "glibc.modulemap.gyb")
5454
set(glibc_modulemap_out "${module_dir}/glibc.modulemap")
@@ -78,7 +78,7 @@ foreach(sdk ${SWIFT_SDKS})
7878
FLAGS
7979
"-DCMAKE_SDK=${sdk}"
8080
"-DGLIBC_INCLUDE_PATH=${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}"
81-
"-DGLIBC_ARCH_INCLUDE_PATH=${GLIBC_SYSROOT_REALTIVE_ARCH_INCLUDE_PATH}")
81+
"-DGLIBC_ARCH_INCLUDE_PATH=${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}")
8282

8383
list(APPEND glibc_modulemap_target_list ${glibc_modulemap_native_target})
8484
set(glibc_modulemap_out ${glibc_sysroot_relative_modulemap_out})

stdlib/public/core/StringLegacy.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extension String {
9090
/// specified prefix.
9191
///
9292
/// The comparison is both case sensitive and Unicode safe. The
93-
/// case-sensitive comparision will only match strings whose corresponding
93+
/// case-sensitive comparison will only match strings whose corresponding
9494
/// characters have the same case.
9595
///
9696
/// let cafe = "Café du Monde"
@@ -143,7 +143,7 @@ extension String {
143143
/// specified suffix.
144144
///
145145
/// The comparison is both case sensitive and Unicode safe. The
146-
/// case-sensitive comparision will only match strings whose corresponding
146+
/// case-sensitive comparison will only match strings whose corresponding
147147
/// characters have the same case.
148148
///
149149
/// let plans = "Let's meet at the café"

stdlib/public/core/StringRangeReplaceableCollection.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ extension String {
111111
/// let str = "The rain in Spain stays mainly in the plain."
112112
///
113113
/// let vowels: Set<Character> = ["a", "e", "i", "o", "u"]
114-
/// let disemvowelled = String(str.characters.lazy.filter { !vowels.contains($0) })
114+
/// let disemvoweled = String(str.characters.lazy.filter { !vowels.contains($0) })
115115
///
116-
/// print(disemvowelled)
116+
/// print(disemvoweled)
117117
/// // Prints "Th rn n Spn stys mnly n th pln."
118118
///
119119
/// - Parameter characters: A sequence of characters.

stdlib/public/core/UnfoldSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public func sequence<T>(first: T, next: (T) -> T?) -> UnfoldFirstSequence<T> {
6363
/// Returns a sequence formed from repeated lazy applications of `next` to a
6464
/// mutable `state`.
6565
///
66-
/// The elements of the sequence are obtaned by invoking `next` with a mutable
66+
/// The elements of the sequence are obtained by invoking `next` with a mutable
6767
/// state. The same state is passed to all invocations of `next`, so subsequent
6868
/// calls will see any mutations made by previous calls. The sequence ends when
6969
/// `next` returns `nil`. If `next` never returns `nil`, the sequence is

stdlib/public/core/Unicode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ extension UTF16 {
954954
}
955955

956956
/// Returns the high-surrogate code unit of the surrogate pair representing
957-
/// the specifed Unicode scalar.
957+
/// the specified Unicode scalar.
958958
///
959959
/// Because a Unicode scalar value can require up to 21 bits to store its
960960
/// value, some Unicode scalars are represented in UTF-16 by a pair of
@@ -978,7 +978,7 @@ extension UTF16 {
978978
}
979979

980980
/// Returns the low-surrogate code unit of the surrogate pair representing
981-
/// the specifed Unicode scalar.
981+
/// the specified Unicode scalar.
982982
///
983983
/// Because a Unicode scalar value can require up to 21 bits to store its
984984
/// value, some Unicode scalars are represented in UTF-16 by a pair of

test/Prototypes/Algorithms.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public protocol MutableCollectionAlgorithms : MutableCollection {
4040
) -> Index
4141
}
4242

43-
// In the stdlib, this conformace wouldn't be needed
43+
// In the stdlib, this conformance wouldn't be needed
4444
extension Array : MutableCollectionAlgorithms { }
4545

4646
/// In the stdlib, this would simply be MutableCollection

test/Sanitizers/tsan-type-metadata.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
// We expect not to report any races on this testcase.
1010

11-
// This test excercises accesses to type metadata, which uses lockless
12-
// syncronization in the runtime that is relied upon by the direct accesses in the IR.
13-
// We have to make sure TSan does not see the acesses to the metadata from the IR.
11+
// This test exercises accesses to type metadata, which uses lockless
12+
// synchronization in the runtime that is relied upon by the direct accesses in the IR.
13+
// We have to make sure TSan does not see the accesses to the metadata from the IR.
1414
// Otherwise, it will report a race.
1515

1616
// Generic classes.

test/Sanitizers/witness_table_lookup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// REQUIRES: OS=macosx
66
// REQUIRES: tsan_runtime
77

8-
// Check taht TSan does not report spurious races in witness table lookup.
8+
// Check that TSan does not report spurious races in witness table lookup.
99

1010
func consume(_ x: Any) {}
1111
protocol Q {

utils/build-script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ details of the setups of other systems or automated environments.""")
12441244
if args.show_sdks:
12451245
swift_build_support.debug.print_xcodebuild_versions()
12461246

1247-
# Clean build direcotry if requested.
1247+
# Clean build directory if requested.
12481248
if args.clean:
12491249
shell.rmtree(workspace.build_root)
12501250

utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ KNOWN_SETTINGS=(
221221
only-execute "all" "Only execute the named action (see implementation)"
222222
)
223223

224-
# Centalized access point for traced command invocation.
224+
# Centralized access point for traced command invocation.
225225
# Every operation that might mutates file system should be called via
226226
# these functions.
227227

utils/swift_build_support/swift_build_support/products/ninja.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# swift_build_support/producsts/ninja.py ------------------------*- python -*-
1+
# swift_build_support/products/ninja.py -------------------------*- python -*-
22
#
33
# This source file is part of the Swift.org open source project
44
#

0 commit comments

Comments
 (0)