Skip to content

Fix typos 🎁 #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/Identifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class DeclName {
DeclName(ASTContext &C, Identifier baseName,
ArrayRef<Identifier> argumentNames);

/// Retrive the 'base' name, i.e., the name that follows the introducer,
/// Retrieve the 'base' name, i.e., the name that follows the introducer,
/// such as the 'foo' in 'func foo(x:Int, y:Int)' or the 'bar' in
/// 'var bar: Int'.
Identifier getBaseName() const {
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/PrintOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ struct PrintOptions {

static PrintOptions printTypeInterface(Type T, DeclContext *DC);

/// Retrive the print options that are suitable to print the testable interface.
/// Retrieve the print options that are suitable to print the testable interface.
static PrintOptions printTestableInterface() {
PrintOptions result = printInterface();
result.AccessibilityFilter = Accessibility::Internal;
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/Stmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class DeferStmt : public Stmt {
Expr *getCallExpr() const { return callExpr; }
void setCallExpr(Expr *E) { callExpr = E; }

/// Dig the original users's body of the defer out for AST fidelity.
/// Dig the original user's body of the defer out for AST fidelity.
BraceStmt *getBodyAsWritten() const;

static bool classof(const Stmt *S) { return S->getKind() == StmtKind::Defer; }
Expand Down
2 changes: 1 addition & 1 deletion include/swift/ASTSectionImporter/ASTSectionImporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace swift {
class SerializedModuleLoader;

/// \brief Povided a memory buffer with an entire Mach-O __apple_ast
/// \brief Provided a memory buffer with an entire Mach-O __apple_ast
/// section, this function makes memory buffer copies of all swift
/// modules found in it and registers them using
/// registerMemoryBuffer() so they can be found by loadModule(). The
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Basic/SuccessorMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class SuccessorMap {
return foundUpperBound;
};

// A heler to finish the operation, given that 'cur' is an upper bound.
// A helper to finish the operation, given that 'cur' is an upper bound.
auto finishWithUpperBound = [&] {
assert(cur->Left == nullptr);
return reassemble(true);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/AbstractionPattern.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- AbstractionPattern.h - SIL type abstraction pattersn ---*- C++ -*-===//
//===--- AbstractionPattern.h - SIL type abstraction patterns ---*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SILOptimizer/PassManager/PassManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class SILPassManager {
}

/// \brief Reset the state of the pass manager and remove all transformation
/// owned by the pass manager. Anaysis passes will be kept.
/// owned by the pass manager. Analysis passes will be kept.
void resetAndRemoveTransformations();

// Sets the name of the current optimization stage used for debugging.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Serialization/SerializedSILLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SerializedSILLoader {
/// Observe that we successfully deserialized a function body.
virtual void didDeserializeFunctionBody(ModuleDecl *M, SILFunction *fn) {}

/// Oberve that we successfully deserialized a witness table's entries.
/// Observe that we successfully deserialized a witness table's entries.
virtual void didDeserializeWitnessTableEntries(ModuleDecl *M,
SILWitnessTable *wt) {}

Expand Down
2 changes: 1 addition & 1 deletion lib/AST/Stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ SourceLoc DeferStmt::getEndLoc() const {
return tempDecl->getBody()->getEndLoc();
}

/// Dig the original users's body of the defer out for AST fidelity.
/// Dig the original user's body of the defer out for AST fidelity.
BraceStmt *DeferStmt::getBodyAsWritten() const {
return tempDecl->getBody();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ClangImporter/SwiftLookupTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ auto SwiftLookupTable::findOrCreate(StringRef baseName)
// Find entries for this base name.
auto known = LookupTable.find(baseName);

// If we found somthing, we're done.
// If we found something, we're done.
if (known != LookupTable.end()) return known;

// If there's no reader, we've found all there is to find.
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/SerializedDiagnosticConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void SerializedDiagnosticConsumer::emitBlockInfoBlock() {
Abbrev->Add(BitCodeAbbrevOp(RECORD_FILENAME));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 10)); // Mapped file ID.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Size.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Modifcation time.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // Modification time.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 16)); // Text size.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // File name text.
Abbrevs.set(RECORD_FILENAME, Stream.EmitBlockInfoAbbrev(BLOCK_DIAG,
Expand Down
4 changes: 2 additions & 2 deletions lib/IDE/CodeCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
if (HaveDot)
return;

// If instance type is type alias, showing users that the contructed
// If instance type is type alias, showing users that the constructed
// type is the typealias instead of the underlying type of the alias.
Optional<Type> Result = None;
if (auto AT = MT->getInstanceType()) {
Expand Down Expand Up @@ -3311,7 +3311,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
static bool isPotentialSignatureMatch(ArrayRef<Type> TupleEles,
ArrayRef<Type> ExprTypes,
DeclContext *DC) {
// Not likely to be a mactch if users provide more arguments than expected.
// Not likely to be a match if users provide more arguments than expected.
if (ExprTypes.size() >= TupleEles.size())
return false;
for (unsigned I = 0; I < ExprTypes.size(); ++ I) {
Expand Down
2 changes: 1 addition & 1 deletion lib/IDE/CodeCompletionResultBuilder.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- CodeCompletionResultBuilder.h - Bulid completion results -----------===//
//===- CodeCompletionResultBuilder.h - Build completion results -----------===//
//
// This source file is part of the Swift.org open source project
//
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/ValueWitness.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ enum class ValueWitness : unsigned {

/// void (*destroyArray)(T *object, size_t n, witness_t *self);
///
/// Given a vaild array of n objects of this type, destroy the object, leaving
/// Given a valid array of n objects of this type, destroy the object, leaving
/// the array invalid. This is useful when generically destroying an array of
/// objects to avoid calling the scalar 'destroy' witness in a loop.
DestroyArray,
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParsePattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ mapParsedParameters(Parser &parser,
if (isKeywordArgumentByDefault || param.PoundLoc.isValid()) {
argName = param.FirstName;

// THe pound is going away. Complain.
// The pound is going away. Complain.
if (param.PoundLoc.isValid()) {
if (isKeywordArgumentByDefault) {
parser.diagnose(param.PoundLoc, diag::parameter_extraneous_pound,
Expand Down
2 changes: 1 addition & 1 deletion lib/Parse/ParseSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3726,7 +3726,7 @@ bool Parser::parseDeclSIL() {
if (FunctionState.diagnoseProblems())
return true;

// If SIL prsing succeeded, verify the generated SIL.
// If SIL parsing succeeded, verify the generated SIL.
if (!FunctionState.P.Diags.hadAnyError())
FunctionState.F->verify();

Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/DynamicCasts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ swift::classifyDynamicCast(Module *M,

// FIXME: tuple conversions?

// FIXME: Be more careful with briding conversions from
// FIXME: Be more careful with bridging conversions from
// NSArray, NSDictionary and NSSet as they may fail?

// Check if there might be a bridging conversion.
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/Projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ processUsersOfValue(ProjectionTree &Tree,
"Adding to non projection user!\b");

// The only projection which we do not currently handle are enums since we
// may not know the correct case. This can be xtended in the future.
// may not know the correct case. This can be extended in the future.
addNonProjectionUser(Op);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/SILFunctionType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static CanType getKnownType(Optional<CanType> &cacheSlot, ASTContext &C,
}
CanType t = *cacheSlot;

// It is possible that we won't find a briding type (e.g. String) when we're
// It is possible that we won't find a bridging type (e.g. String) when we're
// parsing the stdlib itself.
if (t) {
DEBUG(llvm::dbgs() << "Bridging type " << moduleName << '.' << typeName
Expand Down
2 changes: 1 addition & 1 deletion lib/SIL/SILInstructions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ SelectValueInst::create(SILDebugLocation *Loc, SILValue Operand, SILType Type,
SILFunction &F) {
// Allocate enough room for the instruction with tail-allocated data for all
// the case values and the SILSuccessor arrays. There are `CaseBBs.size()`
// SILValuues and `CaseBBs.size() + (DefaultBB ? 1 : 0)` successors.
// SILValues and `CaseBBs.size() + (DefaultBB ? 1 : 0)` successors.
SmallVector<SILValue, 8> CaseValuesAndResults;
for (auto pair : CaseValues) {
CaseValuesAndResults.push_back(pair.first);
Expand Down
2 changes: 1 addition & 1 deletion lib/SILGen/SILGenFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class SILGenBuilder : public SILBuilder {

MetatypeInst *createMetatype(SILLocation Loc, SILType Metatype);

// Generic pply instructions use the conformances necessary to form the call.
// Generic apply instructions use the conformances necessary to form the call.

using SILBuilder::createApply;

Expand Down
2 changes: 1 addition & 1 deletion lib/SILGen/SILGenPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ void PatternMatchEmission::emitSpecializedDispatch(ClauseMatrix &clauses,
ArrayRef<SpecializedRow> rows,
const FailureHandler &innerFailure) {
// These two operations must follow the same rules for column
// placement because 'arguments' are parallel to the matrix colums.
// placement because 'arguments' are parallel to the matrix columns.
// We use the column-specialization algorithm described in
// specializeInPlace.
ClauseMatrix innerClauses = clauses.specializeRowsInPlace(column, rows);
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Analysis/AliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ AliasResult AliasAnalysis::aliasInner(SILValue V1, SILValue V2,
// uses the connection graph to check if the pointers may point to the same
// content.
// Note that escape analysis must work with the original pointers and not the
// underlying objects because it treats projecetions differently.
// underlying objects because it treats projections differently.
if (!EA->canPointToSameMemory(V1, V2)) {
DEBUG(llvm::dbgs() << " Found not-aliased objects based on"
"escape analysis\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Analysis/ColdBlockInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ enum BranchHint : unsigned {
};
} // namespace

/// \return a BranHint if this call is a builtin branch hint.
/// \return a BranchHint if this call is a builtin branch hint.
static BranchHint getBranchHint(SILValue Cond) {
// Handle the fully inlined Builtin.
if (auto *BI = dyn_cast<BuiltinInst>(Cond)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Analysis/EscapeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ updatePointsTo(CGNode *InitialNode, CGNode *pointsTo) {
// Here we handle a special case: all defer-edge paths must eventually end
// in a points-to edge to pointsTo. We ensure this by setting the edge on
// nodes which have no defer-successors (see above). But this does not cover
// the case where there is a terminating cyle in the defer-edge path,
// the case where there is a terminating cycle in the defer-edge path,
// e.g. A -> B -> C -> B
// We find all nodes which don't reach a points-to edge and add additional
// points-to edges to fix that.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/IPO/ClosureSpecializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static void rewriteApplyInst(const CallSiteDescriptor &CSDesc,
// executed more frequently than the closure (for example, if the closure is
// created in a loop preheader and the callee taking the closure is executed
// in the loop). In such a case we must keep the argument live across the
// call site of the callee and emit a matching retain for every innvocation
// call site of the callee and emit a matching retain for every invocation
// of the callee.
//
// %closure = partial_apply (%arg)
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/IPO/PerformanceInliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ void SILPerformanceInliner::visitColdBlocks(


//===----------------------------------------------------------------------===//
// Performane Inliner Pass
// Performance Inliner Pass
//===----------------------------------------------------------------------===//

namespace {
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/LoopTransforms/COWArrayOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ bool COWArrayOpt::checkUniqueArrayContainer(SILValue ArrayContainer) {
return false;
}

/// Lazilly compute blocks that may reach the loop.
/// Lazily compute blocks that may reach the loop.
SmallPtrSetImpl<SILBasicBlock*> &COWArrayOpt::getReachingBlocks() {
if (ReachingBlocks.empty()) {
SmallVector<SILBasicBlock*, 8> Worklist;
Expand Down Expand Up @@ -1770,7 +1770,7 @@ class ArrayPropertiesAnalysis {
return false;
}

// Otherwise, all of our users are sane. The array does not scape.
// Otherwise, all of our users are sane. The array does not escape.
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/LoopTransforms/LICM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static bool sinkFixLiftime(SILLoop *Loop, DominanceInfo *DomTree,
}

namespace {
/// \brief Summmary of may writes occurring in the loop tree rooted at \p
/// \brief Summary of may writes occurring in the loop tree rooted at \p
/// Loop. This includes all writes of the sub loops and the loop itself.
struct LoopNestSummary {
SILLoop *Loop;
Expand Down
10 changes: 5 additions & 5 deletions lib/SILOptimizer/Mandatory/ConstantPropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static SILInstruction *constantFoldBinary(BuiltinInst *BI,
}
}

static std::pair<bool, bool> getTypeSigndness(const BuiltinInfo &Builtin) {
static std::pair<bool, bool> getTypeSignedness(const BuiltinInfo &Builtin) {
bool SrcTySigned =
(Builtin.ID == BuiltinValueKind::SToSCheckedTrunc ||
Builtin.ID == BuiltinValueKind::SToUCheckedTrunc ||
Expand Down Expand Up @@ -503,7 +503,7 @@ constantFoldAndCheckIntegerConversions(BuiltinInst *BI,
// Otherwise report the overflow error.
if (Literal) {
bool SrcTySigned, DstTySigned;
std::tie(SrcTySigned, DstTySigned) = getTypeSigndness(Builtin);
std::tie(SrcTySigned, DstTySigned) = getTypeSignedness(Builtin);
SmallString<10> SrcAsString;
SrcVal.toString(SrcAsString, /*radix*/10, SrcTySigned);

Expand All @@ -521,7 +521,7 @@ constantFoldAndCheckIntegerConversions(BuiltinInst *BI,
// Otherwise, print the Builtin Types.
} else {
bool SrcTySigned, DstTySigned;
std::tie(SrcTySigned, DstTySigned) = getTypeSigndness(Builtin);
std::tie(SrcTySigned, DstTySigned) = getTypeSignedness(Builtin);
diagnose(M.getASTContext(), Loc.getSourceLoc(),
diag::integer_literal_overflow_builtin_types,
DstTySigned, DstTy, SrcAsString);
Expand All @@ -540,10 +540,10 @@ constantFoldAndCheckIntegerConversions(BuiltinInst *BI,

// Otherwise, print the Builtin Types.
} else {
// Since builtin types are sign-agnostic, print the signdness
// Since builtin types are sign-agnostic, print the signedness
// separately.
bool SrcTySigned, DstTySigned;
std::tie(SrcTySigned, DstTySigned) = getTypeSigndness(Builtin);
std::tie(SrcTySigned, DstTySigned) = getTypeSignedness(Builtin);
diagnose(M.getASTContext(), Loc.getSourceLoc(),
diag::integer_conversion_overflow_builtin_types,
SrcTySigned, SrcTy, DstTySigned, DstTy);
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static bool constantFoldTerminator(SILBasicBlock &BB,
}
}

// Not fully covered switches will be diagnosed later. SILGen represnets
// Not fully covered switches will be diagnosed later. SILGen represents
// them with a Default basic block with an unrechable instruction.
// We are going to produce an error on all unreachable instructions not
// eliminated by DCE.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/PassManager/PassManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ SILPassManager::~SILPassManager() {
}

/// \brief Reset the state of the pass manager and remove all transformation
/// owned by the pass manager. Anaysis passes will be kept.
/// owned by the pass manager. Analysis passes will be kept.
void SILPassManager::resetAndRemoveTransformations() {
for (auto T : Transformations)
delete T;
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ struct AllocStackAnalyzer : SILInstructionVisitor<AllocStackAnalyzer> {
return;
}

// Make sure tht the open_existential does not have any uses except
// Make sure that the open_existential does not have any uses except
// destroy_addr.
for (auto *Use : getNonDebugUses(*I)) {
if (!isa<DestroyAddrInst>(Use->getUser())) {
Expand Down Expand Up @@ -964,7 +964,7 @@ SILInstruction *SILCombiner::visitCondBranchInst(CondBranchInst *CBI) {
if (!EnumOperandTy.isLoadable(SEI->getModule()))
return nullptr;

// Result of the selec_enum should be a boolean.
// Result of the select_enum should be a boolean.
if (SEI->getType() != CBI->getCondition().getType())
return nullptr;

Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class DCE : public SILFunctionTransform {

/// Tracks if the pass changed branches.
bool BranchesChanged;
/// Trackes if the pass changed ApplyInsts.
/// Tracks if the pass changed ApplyInsts.
bool CallsChanged;

/// The entry point to the transformation.
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ class DSEContext {
/// Returns the function currently being processing.
SILFunction *getFn() { return F; }

/// Retursn the location vault of the current function.
/// Returns the location vault of the current function.
std::vector<LSLocation> &getLocationVault() { return LocationVault; }

/// Compute the kill set for the basic block. return true if the store set
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class BlockState {
// use(a);
//
// However, by doing so, we can only do the data forwarding after the
// data flow stablizes.
// data flow stabilizes.
//
ForwardSetIn.resize(bitcnt, false);
ForwardSetOut.resize(bitcnt, reachable);
Expand Down Expand Up @@ -414,7 +414,7 @@ class RLEContext {
/// Given the bit, get the LSValue from the LSValueVault.
LSValue &getLSValue(const unsigned index);

/// Transistively collect all the values that make up this location and
/// Transitively collect all the values that make up this location and
/// create a SILArgument out of them.
SILValue computePredecessorLocationValue(SILBasicBlock *BB, LSLocation &L);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RedundantOverflowCheckRemovalPass : public SILFunctionTransform {
// Perform a forward scan and use control flow and previously detected
// overflow checks to remove the overflow checks.

// For each block in a Reverse Post Prder scan:
// For each block in a Reverse Post Order scan:
for (auto &BB : ReversePostOrder) {
// For each instruction:
for (auto Inst = BB->begin(), End = BB->end(); Inst != End; Inst++) {
Expand Down
Loading