Skip to content

Commit

Permalink
[gardening] Fix typos: "word word" (two spaces) → "word word" (one sp…
Browse files Browse the repository at this point in the history
…ace)
practicalswift committed Jan 24, 2016
1 parent 4023896 commit 71e00fe
Showing 41 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ if(LITRE_EXECUTABLE)
VERBATIM
)

# Only update the real top-level CMakeLists.txt if something changed
# Only update the real top-level CMakeLists.txt if something changed
add_custom_command(
OUTPUT
"litre-tests/CMakeLists.txt"
2 changes: 1 addition & 1 deletion docs/ErrorHandling.rst
Original file line number Diff line number Diff line change
@@ -578,7 +578,7 @@ of failability.

One limitation of this approach is that we need to be able to reconstruct
the selector to use when an overload of a method is introduced. For this
reason, the import is likely to be limited to methods where the error
reason, the import is likely to be limited to methods where the error
parameter is the last one and the corresponding selector
chunk is either ``error:`` or the first chunk (see below). Empirically,
this seems to do the right thing for all but two sets of APIs in the
2 changes: 1 addition & 1 deletion docs/TypeChecker.rst
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ the Swift type system:
flavors of equality constraints:

- Exact equality constraints, or "binding", written ``T0 := X``
for some type variable ``T0`` and type ``X``, which requires
for some type variable ``T0`` and type ``X``, which requires
that ``T0`` be exactly identical to ``X``;
- Equality constraints, written ``X == Y`` for types ``X`` and
``Y``, which require ``X`` and ``Y`` to have the same type,
2 changes: 1 addition & 1 deletion docs/archive/LangRef.html
Original file line number Diff line number Diff line change
@@ -1093,7 +1093,7 @@ <h3 id="type-function">Function Types</h3>

<p>The result type of a function type must
be <a href="#materializable">materializable</a>. The argument type of a
function is always required to be parenthesized (a tuple). The behavior
function is always required to be parenthesized (a tuple). The behavior
of function types may be modified with the <a
href="#attribute-autoclosure"><tt>autoclosure</tt> attribute</a>.</p>

2 changes: 1 addition & 1 deletion docs/doxygen.intro
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
/// Welcome to Swift.
///
/// This documentation describes the @b internal software that makes
/// up Swift, not the @b external use of Swift. There are no instructions
/// up Swift, not the @b external use of Swift. There are no instructions
/// here on how to use Swift, only the APIs that make up the software. For usage
/// instructions, please see the programmer's guide or reference manual.
///
2 changes: 1 addition & 1 deletion docs/proposals/OptimizerEffects.rst
Original file line number Diff line number Diff line change
@@ -482,7 +482,7 @@ destructor can have arbitrary side-effects. Therefore, it is not valid to hoist
the makeUnique in the code without proving that 'T's destructor cannot change
the uniqueness state. This is trivial for trivial types but requires a more
sophisticated analysis for class types (and in general cannot be disproved). In
following example we can only hoist makeUnique if we can prove that elt's, and
following example we can only hoist makeUnique if we can prove that elt's, and
elt2's destructor can't change the uniqueness state of the arrays.::

for i in 0 ..< min(a.size, b.size) {
2 changes: 1 addition & 1 deletion include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ class SILOptions {
OptimizeUnchecked
};

/// Controls how perform SIL linking.
/// Controls how to perform SIL linking.
LinkingMode LinkMode = LinkNormal;

/// Remove all runtime assertions during optimizations.
2 changes: 1 addition & 1 deletion include/swift/AST/Types.h
Original file line number Diff line number Diff line change
@@ -1924,7 +1924,7 @@ class ModuleType : public TypeBase {

// Implement isa/cast/dyncast/etc.
static bool classof(const TypeBase *T) {
return T->getKind() == TypeKind::Module;
return T->getKind() == TypeKind::Module;
}

private:
2 changes: 1 addition & 1 deletion include/swift/LLVMPasses/PassesFwd.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- PassesFwd.h - Creation functions for LLVM passes ------*- C++ -*-===//
//===--- PassesFwd.h - Creation functions for LLVM passes -------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
6 changes: 3 additions & 3 deletions include/swift/SIL/PatternMatch.h
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ inline match_combine_and<LTy, RTy> m_CombineAnd(const LTy &L, const RTy &R) {

/// Helper class to track the return type of vararg m_CombineOr matcher.
template <typename ...Arguments>
struct OneOf_match;
struct OneOf_match;

template <typename T0>
struct OneOf_match<T0> {
@@ -711,8 +711,8 @@ m_Ext(const T0 &Op0) {

/// Matcher for any of the builtin CheckedTrunc instructions.
template <typename T0>
inline typename OneOf_match<BuiltinApplyTy<T0>, BuiltinApplyTy<T0>,
BuiltinApplyTy<T0>, BuiltinApplyTy<T0>>::Ty
inline typename OneOf_match<BuiltinApplyTy<T0>, BuiltinApplyTy<T0>,
BuiltinApplyTy<T0>, BuiltinApplyTy<T0>>::Ty
m_CheckedTrunc(const T0 &Op0) {
return m_UToSCheckedTrunc(Op0) || m_SToUCheckedTrunc(Op0) ||
m_UToUCheckedTrunc(Op0) || m_SToSCheckedTrunc(Op0);
2 changes: 1 addition & 1 deletion include/swift/SIL/Projection.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- Projection.h - Utilities for working with Projections -*- C++ -*-===//
//===--- Projection.h - Utilities for working with Projections --*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
2 changes: 1 addition & 1 deletion include/swift/SIL/SILInstruction.h
Original file line number Diff line number Diff line change
@@ -960,7 +960,7 @@ class FunctionRefInst : public LiteralInst {
/// Construct a FunctionRefInst.
///
/// \param DebugLoc The location of the reference.
/// \param F The function being referenced.
/// \param F The function being referenced.
FunctionRefInst(SILDebugLocation *DebugLoc, SILFunction *F);

public:
2 changes: 1 addition & 1 deletion lib/IDE/ReconstructType.cpp
Original file line number Diff line number Diff line change
@@ -799,7 +799,7 @@ FindNamedDecls (SwiftASTContext *ast,
}
}
}
else if (result._module)
else if (result._module)
{
swift::Module::AccessPathTy access_path;
llvm::SmallVector<swift::ValueDecl*, 4> decls;
4 changes: 2 additions & 2 deletions lib/IRGen/GenObjC.cpp
Original file line number Diff line number Diff line change
@@ -341,7 +341,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCSelectorRef(StringRef selector) {

/// Get or create an ObjC protocol record. Always returns an i8*. We lazily
/// create ObjC protocol_t records for protocols, storing references to the
/// record into the __objc_protolist and and __objc_protorefs sections to be
/// record into the __objc_protolist and __objc_protorefs sections to be
/// fixed up by the runtime.
///
/// It is not correct to use this value as a Protocol* reference directly. The
@@ -356,7 +356,7 @@ llvm::Constant *IRGenModule::getAddrOfObjCProtocolRecord(ProtocolDecl *proto,

/// Get or create an ObjC protocol reference. Always returns an i8**. We lazily
/// create ObjC protocol_t records for protocols, storing references to the
/// record into the __objc_protolist and and __objc_protorefs sections to be
/// record into the __objc_protolist and __objc_protorefs sections to be
/// fixed up by the runtime.
llvm::Constant *IRGenModule::getAddrOfObjCProtocolRef(ProtocolDecl *proto,
ForDefinition_t forDefinition) {
2 changes: 1 addition & 1 deletion lib/IRGen/GenTuple.cpp
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//
//
// This file implements IR generation for tuple types in Swift. This
// includes creating the IR type as well as emitting the primitive access
// includes creating the IR type as well as emitting the primitive access
// operations.
//
// It is assumed in several places in IR-generation that the
2 changes: 1 addition & 1 deletion lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
@@ -4052,7 +4052,7 @@ Parser::parseDeclFunc(SourceLoc StaticLoc, StaticSpellingKind StaticSpelling,
Identifier SimpleName;
SourceLoc NameLoc = Tok.getLoc();
Token NonglobalTok = Tok;
bool NonglobalError = false;
bool NonglobalError = false;

if (!(Flags & PD_AllowTopLevel) &&
!(Flags & PD_InProtocol) &&
2 changes: 1 addition & 1 deletion lib/SIL/SILInstruction.cpp
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file defines the high-level SILInstruction classes used for SIL code.
// This file defines the high-level SILInstruction classes used for SIL code.
//
//===----------------------------------------------------------------------===//

2 changes: 1 addition & 1 deletion lib/SIL/SILInstructions.cpp
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
//
// This file defines the high-level SILInstruction classes used for SIL code.
// This file defines the high-level SILInstruction classes used for SIL code.
//
//===----------------------------------------------------------------------===//

2 changes: 1 addition & 1 deletion lib/SILGen/SILGenApply.cpp
Original file line number Diff line number Diff line change
@@ -3503,7 +3503,7 @@ namespace {
closureTy);
result = ManagedValue::forUnmanaged(partialApply);
// Handle a regular call.
} else if (!specializedEmitter) {
} else if (!specializedEmitter) {
result = gen.emitApply(uncurriedLoc.getValue(), mv,
callee.getSubstitutions(),
uncurriedArgs,
2 changes: 1 addition & 1 deletion lib/SILGen/SILGenFunction.h
Original file line number Diff line number Diff line change
@@ -568,7 +568,7 @@ class LLVM_LIBRARY_VISIBILITY SILGenFunction
SILDeclRef fromLevel, SILDeclRef toLevel);
/// Generates a thunk from a foreign function to the native Swift convention.
void emitForeignToNativeThunk(SILDeclRef thunk);
/// Generates a thunk from a native function to the conventions.
/// Generates a thunk from a native function to the conventions.
void emitNativeToForeignThunk(SILDeclRef thunk);

// Generate a nullary function that returns the given value.
4 changes: 2 additions & 2 deletions lib/SILOptimizer/Analysis/MemoryBehavior.cpp
Original file line number Diff line number Diff line change
@@ -108,9 +108,9 @@ class MemoryBehaviorVisitor
#define OPERANDALIAS_MEMBEHAVIOR_INST(Name) \
MemBehavior visit##Name(Name *I) { \
for (Operand &Op : I->getAllOperands()) { \
if (!AA->isNoAlias(Op.get(), V)) { \
if (!AA->isNoAlias(Op.get(), V)) { \
DEBUG(llvm::dbgs() << " " #Name \
" does alias inst. Returning Normal behavior.\n"); \
" does alias inst. Returning Normal behavior.\n"); \
return I->getMemoryBehavior(); \
} \
} \
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp
Original file line number Diff line number Diff line change
@@ -1701,7 +1701,7 @@ void LifetimeChecker::deleteDeadRelease(unsigned ReleaseID) {

/// processNonTrivialRelease - We handle two kinds of release instructions here:
/// destroy_addr for alloc_stack's and strong_release/dealloc_box for
/// alloc_box's. By the time that DI gets here, we've validated that all uses
/// alloc_box's. By the time that DI gets here, we've validated that all uses
/// of the memory location are valid. Unfortunately, the uses being valid
/// doesn't mean that the memory is actually initialized on all paths leading to
/// a release. As such, we have to push the releases up the CFG to where the
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp
Original file line number Diff line number Diff line change
@@ -925,7 +925,7 @@ bool AllocOptimize::tryToRemoveDeadAllocation() {
bool AllocOptimize::doIt() {
bool Changed = false;

// Don't try to optimize incomplete aggregates.
// Don't try to optimize incomplete aggregates.
if (MemoryType.aggregateHasUnreferenceableStorage())
return false;

4 changes: 2 additions & 2 deletions lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
Original file line number Diff line number Diff line change
@@ -624,7 +624,7 @@ static SILValue getInitOrOpenExistential(AllocStackInst *ASI, SILValue &Src) {
return SrcValue;
}

/// find the init_existential, which could be used to determine a concrete
/// find the init_existential, which could be used to determine a concrete
/// type of the \p Self.
static SILInstruction *findInitExistential(FullApplySite AI, SILValue Self,
CanType &OpenedArchetype) {
@@ -1015,7 +1015,7 @@ static ApplyInst *optimizeCastThroughThinFunctionPointer(
return nullptr;

// The fourth parameter is a metatype of a bound generic type. Use it to
// obtain the type substitutions to apply.
// obtain the type substitutions to apply.
auto MetaTy = dyn_cast<MetatypeType>(CastedParams[3].getType());
if (!MetaTy)
return nullptr;
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ class DSEContext;
/// 2. When a load instruction is encountered, remove the loaded location and
/// any location it may alias with from the BBWriteSetMid.
///
/// 3. When an instruction reads from memory in an unknown way, the
/// 3. When an instruction reads from memory in an unknown way, the
/// BBWriteSetMid bit is cleared if the instruction can read the
/// corresponding LSLocation.
///
10 changes: 5 additions & 5 deletions lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp
Original file line number Diff line number Diff line change
@@ -232,7 +232,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
static bool isKnownPositive(SILValue N) {
if (IntegerLiteralInst *NI = dyn_cast<IntegerLiteralInst>(N))
return NI->getValue().isStrictlyPositive();
return false;
return false;
}

/// Return true if the absolute value of \p A is smaller than the
@@ -278,7 +278,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
if (F.Relationship == ValueRelation::SAdd) {
// L + R already known to not trap at this point in the program.
// And the following applies:
// L >= A and R >= B or (commutatively) R >= A and L >= B.
// L >= A and R >= B or (commutatively) R >= A and L >= B.
SILValue A = BI->getOperand(0);
SILValue B = BI->getOperand(1);
if (knownRelation(A, L, ValueRelation::SLE) &&
@@ -307,7 +307,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
if (F.Relationship == ValueRelation::UAdd) {
// L + R already known to not trap at this point in the program.
// And the following applies:
// L >= A and R >= B or (commutatively) R >= A and L >= B.
// L >= A and R >= B or (commutatively) R >= A and L >= B.
SILValue A = BI->getOperand(0);
SILValue B = BI->getOperand(1);
if (knownRelation(A, L, ValueRelation::ULE) &&
@@ -368,7 +368,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
if (F.Relationship == ValueRelation::UMul) {
// L * R already known to not trap at this point in the program.
// And the following applies:
// L >= A and R >= B or (commutatively) R >= A and L >= B.
// L >= A and R >= B or (commutatively) R >= A and L >= B.
SILValue A = BI->getOperand(0);
SILValue B = BI->getOperand(1);
if (knownRelation(A, L, ValueRelation::ULE) &&
@@ -526,7 +526,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
ValueRelation Rel;
switch (BI->getBuiltinInfo().ID) {
default: return;
case BuiltinValueKind::SAddOver:
case BuiltinValueKind::SAddOver:
Rel = ValueRelation::SAdd;
break;
case BuiltinValueKind::UAddOver:
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/SILCodeMotion.cpp
Original file line number Diff line number Diff line change
@@ -896,7 +896,7 @@ static bool isRetainAvailableInSomeButNotAllPredecessors(
});

// Check that there is no decrement or check from the increment to the end
// of the basic block. After we have hoisted the first release this release
// of the basic block. After we have hoisted the first release this release
// would prevent further hoisting. Instead we check that no decrement or
// check occurs up to this hoisted release.
auto End = CheckUpToInstruction[Pred];
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/SILLowerAggregateInstrs.cpp
Original file line number Diff line number Diff line change
@@ -156,7 +156,7 @@ static bool expandDestroyAddr(DestroyAddrInst *DA) {

static bool expandReleaseValue(ReleaseValueInst *DV) {
SILModule &Module = DV->getModule();
SILBuilderWithScope Builder(DV);
SILBuilderWithScope Builder(DV);

// Strength reduce destroy_addr inst into release/store if
// we have a non-address only type.
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp
Original file line number Diff line number Diff line change
@@ -537,7 +537,7 @@ bool CheckedCastBrJumpThreading::areEquivalentConditionsAlongSomePaths() {
}

/// Check if conditions of CCBI and DomCCBI are equivalent along
/// all or at least some paths.
/// all or at least some paths.
bool CheckedCastBrJumpThreading::areEquivalentConditionsAlongPaths() {
// Are conditions equivalent along all paths?
if (DomCondition == Condition) {
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Utils/Devirtualize.cpp
Original file line number Diff line number Diff line change
@@ -694,7 +694,7 @@ static ApplySite devirtualizeWitnessMethod(ApplySite AI, SILFunction *F,
// Collect all the required substitutions.
//
// The complete set of substitutions may be different, e.g. because the found
// witness thunk F may have been created by a specialization pass and have
// witness thunk F may have been created by a specialization pass and have
// additional generic parameters.
SmallVector<Substitution, 16> NewSubstList(Subs.begin(), Subs.end());
if (auto generics = AI.getOrigCalleeType()->getGenericSignature()) {
4 changes: 2 additions & 2 deletions lib/SILOptimizer/Utils/Local.cpp
Original file line number Diff line number Diff line change
@@ -1120,7 +1120,7 @@ ValueLifetime ValueLifetimeAnalysis::computeLastUsers() {
// Casts Optimization and Simplification
//===----------------------------------------------------------------------===//

/// \brief Get a substitution corresponding to the type witness.
/// \brief Get a substitution corresponding to the type witness.
/// Inspired by ProtocolConformance::getTypeWitnessByName.
static const Substitution *
getTypeWitnessByName(ProtocolConformance *conformance, Identifier name) {
@@ -1187,7 +1187,7 @@ optimizeBridgedObjCToSwiftCast(SILInstruction *Inst,
auto Loc = Inst->getLoc();

// The conformance to _BridgedToObjectiveC is statically known.
// Retrieve the bridging operation to be used if a static conformance
// Retrieve the bridging operation to be used if a static conformance
// to _BridgedToObjectiveC can be proven.
FuncDecl *BridgeFuncDecl =
isConditional
6 changes: 3 additions & 3 deletions lib/Sema/CSApply.cpp
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
using namespace swift;
using namespace constraints;

/// \brief Get a substitution corresponding to the type witness.
/// \brief Get a substitution corresponding to the type witness.
/// Inspired by ProtocolConformance::getTypeWitnessByName.
const Substitution *
getTypeWitnessByName(ProtocolConformance *conformance,
@@ -1348,13 +1348,13 @@ namespace {

if (conformsToBridgedToObjectiveC) {
// The conformance to _BridgedToObjectiveC is statically known.
// Retrieve the bridging operation to be used if a static conformance
// Retrieve the bridging operation to be used if a static conformance
// to _BridgedToObjectiveC can be proven.
fn = conditional
? tc.Context.getConditionallyBridgeFromObjectiveCBridgeable(&tc)
: tc.Context.getForceBridgeFromObjectiveCBridgeable(&tc);
} else {
// Retrieve the bridging operation to be used if a static conformance
// Retrieve the bridging operation to be used if a static conformance
// to _BridgedToObjectiveC cannot be proven.
fn = conditional ? tc.Context.getConditionallyBridgeFromObjectiveC(&tc)
: tc.Context.getForceBridgeFromObjectiveC(&tc);
2 changes: 1 addition & 1 deletion lib/Sema/DerivedConformances.cpp
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ ValueDecl *DerivedConformance::getDerivableRequirement(NominalTypeDecl *nominal,

// Retrieve the requirement.
auto results = proto->lookupDirect(name);
return results.empty() ? nullptr : results.front();
return results.empty() ? nullptr : results.front();
};

// Properties.
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckDecl.cpp
Original file line number Diff line number Diff line change
@@ -4814,7 +4814,7 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
return true;
}

/// Returns true if a diagnostic about an accessor being less available
/// Returns true if a diagnostic about an accessor being less available
/// than the accessor it overrides would be redundant because we will
/// already emit another diagnostic.
static bool
Loading

0 comments on commit 71e00fe

Please sign in to comment.