Skip to content

Commit c065a7b

Browse files
committed
Merge pull request #2534 from practicalswift/typo-fixes-20160514
2 parents 69768ba + 21c872c commit c065a7b

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

include/swift/Reflection/ReflectionContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class ReflectionContext
149149
return nullptr;
150150

151151
case MetadataKind::ErrorObject:
152-
// ErrorProtocol boxed existential on non-Objective C runtime target
152+
// ErrorProtocol boxed existential on non-Objective-C runtime target
153153
return nullptr;
154154

155155
default:

lib/LLVMPasses/LLVMMergeFunctions.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
//===----------------------------------------------------------------------===//
99
//
10-
// This pass looks for similar functions that are mergable and folds them.
10+
// This pass looks for similar functions that are mergeable and folds them.
1111
// The implementation is similar to LLVM's MergeFunctions pass. Instead of
1212
// merging identical functions, it merges functions which only differ by a few
1313
// constants in certain instructions.
@@ -243,7 +243,7 @@ class FunctionComparator {
243243
int cmpConstants(const Constant *L, const Constant *R);
244244

245245
/// Compares two global values by number. Uses the GlobalNumbersState to
246-
/// identify the same gobals across function calls.
246+
/// identify the same globals across function calls.
247247
int cmpGlobalValues(GlobalValue *L, GlobalValue *R);
248248

249249
/// Assign or look up previously assigned numbers for the two values, and
@@ -482,7 +482,7 @@ int FunctionComparator::cmpRangeMetadata(const MDNode* L,
482482
// TODO: Note that as this is metadata, it is possible to drop and/or merge
483483
// this data when considering functions to merge. Thus this comparison would
484484
// return 0 (i.e. equivalent), but merging would become more complicated
485-
// because the ranges would need to be unioned. It is not likely that
485+
// because the ranges would need to be combined. It is not likely that
486486
// functions differ ONLY in this metadata if they are actually the same
487487
// function semantically.
488488
if (int Res = cmpNumbers(L->getNumOperands(), R->getNumOperands()))
@@ -607,8 +607,8 @@ int FunctionComparator::cmpConstants(const Constant *L, const Constant *R) {
607607
const auto *SeqR = cast<ConstantDataSequential>(R);
608608
// This handles ConstantDataArray and ConstantDataVector. Note that we
609609
// compare the two raw data arrays, which might differ depending on the host
610-
// endianness. This isn't a problem though, because the endiness of a module
611-
// will affect the order of the constants, but this order is the same
610+
// endianness. This isn't a problem though, because the endianness of a
611+
// module will affect the order of the constants, but this order is the same
612612
// for a given input module and host platform.
613613
return cmpMem(SeqL->getRawDataValues(), SeqR->getRawDataValues());
614614
}
@@ -1383,7 +1383,7 @@ class SwiftMergeFunctions : public ModulePass {
13831383
/// first entry.
13841384
int numUnhandledCallees;
13851385

1386-
/// The iterator of the functions's equivalence class in the FnTree.
1386+
/// The iterator of the function's equivalence class in the FnTree.
13871387
/// It's FnTree.end() if the function is not in an equivalence class.
13881388
FnTreeType::iterator TreeIter;
13891389

@@ -1796,7 +1796,7 @@ bool SwiftMergeFunctions::tryMergeEquivalenceClass(FunctionEntry *FirstInClass)
17961796
// Merged or not: in any case we remove the equivalence class from the FnTree.
17971797
removeEquivalenceClassFromTree(FirstInClass);
17981798

1799-
// Containes functions which differ too much from the first function (i.e.
1799+
// Contains functions which differ too much from the first function (i.e.
18001800
// would need too many parameters).
18011801
FunctionInfos Removed;
18021802

stdlib/public/core/CompilerProtocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public protocol BooleanLiteralConvertible {
287287
/// A type that can represent a Boolean literal, such as `Bool`.
288288
associatedtype BooleanLiteralType : _BuiltinBooleanLiteralConvertible
289289

290-
/// Creates an instance initialized to to the given Boolean value.
290+
/// Creates an instance initialized to the given Boolean value.
291291
///
292292
/// Do not call this initializer directly. Instead, initialize a variable or
293293
/// constant using one of the Boolean literals `true` and `false`. For

stdlib/public/core/FloatingPoint.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public protocol FloatingPoint: Comparable, IntegerLiteralConvertible,
6666
/// This initializer implements the IEEE 754 `scaleB` operation.
6767
init(sign: FloatingPointSign, exponent: Exponent, significand: Self)
6868

69-
/// A floating point value whose exponent and signficand are taken from
69+
/// A floating point value whose exponent and significand are taken from
7070
/// `magnitude` and whose sign is taken from `signOf`. Implements the
7171
/// IEEE 754 `copysign` operation.
7272
init(signOf: Self, magnitudeOf: Self)
@@ -77,7 +77,7 @@ public protocol FloatingPoint: Comparable, IntegerLiteralConvertible,
7777

7878
% end
7979
/* TODO: Implement the following APIs once a revised integer protocol is
80-
introduced that allows for them to be implemeneted. In particular, we
80+
introduced that allows for them to be implemented. In particular, we
8181
need to have an "index of most significant bit" operation and "get
8282
absolute value as unsigned type" operation on the Integer protocol.
8383

@@ -158,7 +158,7 @@ public protocol FloatingPoint: Comparable, IntegerLiteralConvertible,
158158
/// This quantity, or a related quantity is sometimes called "epsilon" or
159159
/// "machine epsilon". We avoid that name because it has different meanings
160160
/// in different languages, which can lead to confusion, and because it
161-
/// suggests that it is an good tolerance to use for comparisons,
161+
/// suggests that it is a good tolerance to use for comparisons,
162162
/// which is almost never is.
163163
///
164164
/// (See https://en.wikipedia.org/wiki/Machine_epsilon for more detail)
@@ -424,7 +424,7 @@ public protocol FloatingPoint: Comparable, IntegerLiteralConvertible,
424424
@warn_unused_result
425425
func isLessThanOrEqualTo(_ other: Self) -> Bool
426426

427-
/// True if and only if `self` preceeds `other` in the IEEE 754 total order
427+
/// True if and only if `self` precedes `other` in the IEEE 754 total order
428428
/// relation.
429429
///
430430
/// This relation is a refinement of `<=` that provides a total order on all

stdlib/public/core/Optional.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public enum Optional<Wrapped> : NilLiteralConvertible {
181181
/// print(nonOverflowingSquare)
182182
/// // Prints "Optional(1746)"
183183
///
184-
/// - Parameter f: A closure that takes the unwrapped value of the intance.
184+
/// - Parameter f: A closure that takes the unwrapped value of the instance.
185185
/// - Returns: The result of the given closure. If this instance is `nil`,
186186
/// returns `nil`.
187187
@warn_unused_result
@@ -505,7 +505,7 @@ public func ?? <T> (optional: T?, defaultValue: @autoclosure () throws -> T)
505505
/// value, you can chain default values by using `??` multiple times. The
506506
/// first optional value that isn't `nil` stops the chain and becomes the
507507
/// result of the whole expression. The next example tries to find the correct
508-
/// text for a greeting in two sepearate dictionaries before falling back to a
508+
/// text for a greeting in two separate dictionaries before falling back to a
509509
/// static default.
510510
///
511511
/// let greeting = userPrefs[greetingKey] ??

stdlib/public/core/Policy.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// When declaring a function or method, you don't need to specify a return
2222
/// type if no value will be returned. However, the type of a function,
2323
/// method, or closure always includes a return type, which is `Void` if
24-
/// otherwise unspeficied.
24+
/// otherwise unspecified.
2525
///
2626
/// Use `Void` or an empty tuple as the return type when declaring a
2727
/// closure, function, or method that doesn't return a value.
@@ -115,7 +115,7 @@ public typealias _MaxBuiltinFloatType = Builtin.FPIEEE64
115115
/// `as!`).
116116
///
117117
/// For example, use `as?` to conditionally downcast the first object
118-
/// in an heterogenous array to a `String`.
118+
/// in a heterogeneous array to a `String`.
119119
///
120120
/// let mixed: [Any] = ["one", "two", 3, true, {(x: Int) -> Int in x * 2 }]
121121
///

test/SILGen/specialize_attr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class CC<T : PP> {
3737
// CHECK-LABEL: sil [noinline] [_specialize <RR, Float, SS, Int>] @_TFC15specialize_attr2CC3foouRd__S_2QQrfTqd__1gGVS_2GGx__Tqd__GS2_x__ : $@convention(method) <T where T : PP><U where U : QQ> (@in U, GG<T>, @guaranteed CC<T>) -> (@out U, GG<T>) {
3838

3939
// -----------------------------------------------------------------------------
40-
// Test user-specialized subscript accesors.
40+
// Test user-specialized subscript accessors.
4141

4242
public protocol TestSubscriptable {
4343
associatedtype Element

test/SILOptimizer/optimize_never.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ bb0(%0 : $Derived2):
431431
}
432432

433433
// Check that class_method is not speculatively devirtualized, because the
434-
// method foo in the class Base, which mentioned in the the class_method
434+
// method foo in the class Base, which mentioned in the class_method
435435
// instruction is marked with @_semantics("optimize.sil.never").
436436
//
437437
// CHECK-LABEL: sil @_TF14optimize_never19testDoNotDevirtBaseFT1oCS_4Base_Vs5Int32

test/SILOptimizer/sink.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ public protocol P : class {
219219

220220
// Check that open_existential is not moved after its uses and still
221221
// dominates them after a run of a code sinking pass.
222-
// CHECK-LABEL: sil @dont_sink_open_existenial
222+
// CHECK-LABEL: sil @dont_sink_open_existential
223223
// CHECK-NOT: metatype
224224
// CHECK-NOT: witness_method
225225
// CHECK: open_existential_ref
226226
// CHECK: metatype
227-
sil @dont_sink_open_existenial : $@convention(thin) (@owned P) -> () {
227+
sil @dont_sink_open_existential : $@convention(thin) (@owned P) -> () {
228228
bb0(%0 : $P):
229229
%1 = open_existential_ref %0 : $P to $@opened("C4960DBA-02C5-11E6-BE1B-B8E856428C60") P
230230
%2 = metatype $@thick (@opened("C4960DBA-02C5-11E6-BE1B-B8E856428C60") P).Type

test/expr/unary/selector/property.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func testNonObjCMembers(nonObjCInstance: NonObjCClass) {
113113
let _ = #selector(getter: myObjcInstance.undefinedProperty) // expected-error{{value of type 'ObjCClass' has no member 'undefinedProperty'}}
114114
}
115115

116-
// Ambigous expressions
116+
// Ambiguous expressions
117117
func testAmbiguous(myObjcInstance: ObjCClass) { // expected-note{{'myObjcInstance' declared here}}
118118

119119
// Referring to a properties not within a type.
@@ -212,7 +212,7 @@ class InstanceStaticTestClass {
212212
}
213213
}
214214

215-
// Acccessibility
215+
// Accessibility
216216
let otherObjCInstance = OtherObjCClass()
217217

218218
let v11 = #selector(getter: OtherObjCClass.privateVar) // expected-error{{'privateVar' is inaccessible due to 'private' protection level}}

0 commit comments

Comments
 (0)