Skip to content

Commit

Permalink
Fix typos in code (non-comment typos).
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Dec 27, 2015
1 parent 4b6d7b9 commit d89b4d4
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions include/swift/SILOptimizer/Analysis/EscapeAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
}

/// Finds a successor node in the outgoing defer edges.
llvm::SmallVectorImpl<CGNode *>::iterator findDefered(CGNode *Def) {
llvm::SmallVectorImpl<CGNode *>::iterator findDeferred(CGNode *Def) {
return std::find(defersTo.begin(), defersTo.end(), Def);
}

Expand All @@ -209,7 +209,7 @@ class EscapeAnalysis : public BottomUpIPAnalysis {
}

/// Adds a defer-edge to another node \p To. Not done if \p To is this node.
bool addDefered(CGNode *To) {
bool addDeferred(CGNode *To) {
assert(!To->isMerged);
if (To == this)
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/AST/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace swift;
llvm::raw_ostream &swift::operator<<(llvm::raw_ostream &OS, PatternKind kind) {
switch (kind) {
case PatternKind::Paren:
return OS << "parethesized pattern";
return OS << "parenthesized pattern";
case PatternKind::Tuple:
return OS << "tuple pattern";
case PatternKind::Named:
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/GenProto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,7 @@ llvm::Value *MetadataPath::followComponent(IRGenFunction &IGF,
llvm_unreachable("following an impossible path!");

}
llvm_unreachable("bad metata path component");
llvm_unreachable("bad metadata path component");
}

/// Collect any required metadata for a witness method from the end of
Expand Down
2 changes: 1 addition & 1 deletion lib/SILOptimizer/ARC/GlobalLoopARCSequenceDataflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void LoopARCSequenceDataflowEvaluator::mergeSuccessors(const LoopRegion *Region,
}

// Otherwise, we treat it as unknown control flow.
DEBUG(llvm::dbgs() << " Cleaing state b/c of early exit\n");
DEBUG(llvm::dbgs() << " Clearing state b/c of early exit\n");
State.clear();
break;
}
Expand Down
28 changes: 14 additions & 14 deletions lib/SILOptimizer/Analysis/EscapeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ EscapeAnalysis::CGNode *EscapeAnalysis::ConnectionGraph::getContentNode(
}

bool EscapeAnalysis::ConnectionGraph::addDeferEdge(CGNode *From, CGNode *To) {
if (!From->addDefered(To))
if (!From->addDeferred(To))
return false;

CGNode *FromPointsTo = From->pointsTo;
Expand Down Expand Up @@ -167,7 +167,7 @@ void EscapeAnalysis::ConnectionGraph::mergeAllScheduledNodes() {
PredNode->setPointsTo(To);
} else {
assert(PredNode != From);
auto Iter = PredNode->findDefered(From);
auto Iter = PredNode->findDeferred(From);
assert(Iter != PredNode->defersTo.end() &&
"Incoming defer-edge not found in predecessor's defer list");
PredNode->defersTo.erase(Iter);
Expand Down Expand Up @@ -280,10 +280,10 @@ updatePointsTo(CGNode *InitialNode, CGNode *pointsTo) {
}

// Add all adjacent nodes to the WorkList.
for (auto *Defered : Node->defersTo) {
if (!Defered->isInWorkList) {
WorkList.push_back(Defered);
Defered->isInWorkList = true;
for (auto *Deferred : Node->defersTo) {
if (!Deferred->isInWorkList) {
WorkList.push_back(Deferred);
Deferred->isInWorkList = true;
}
}
for (Predecessor Pred : Node->Preds) {
Expand Down Expand Up @@ -506,10 +506,10 @@ bool EscapeAnalysis::ConnectionGraph::mergeFrom(ConnectionGraph *SourceGraph,
DestFrom = DestFrom->getMergeTarget();
}

for (auto *Defered : SourceReachable->defersTo) {
if (!Defered->isInWorkList) {
WorkList.push_back(Defered);
Defered->isInWorkList = true;
for (auto *Deferred : SourceReachable->defersTo) {
if (!Deferred->isInWorkList) {
WorkList.push_back(Deferred);
Deferred->isInWorkList = true;
}
}
}
Expand Down Expand Up @@ -572,7 +572,7 @@ struct CGForDotView {

enum EdgeTypes {
PointsTo,
Defered
Deferred
};

struct Node {
Expand Down Expand Up @@ -629,7 +629,7 @@ CGForDotView::CGForDotView(const EscapeAnalysis::ConnectionGraph *CG) :
}
for (auto *Def : OrigNode->defersTo) {
Nd.Children.push_back(Orig2Node[Def]);
Nd.ChildrenTypes.push_back(Defered);
Nd.ChildrenTypes.push_back(Deferred);
}
}
}
Expand Down Expand Up @@ -767,7 +767,7 @@ namespace llvm {
unsigned ChildIdx = I - Node->Children.begin();
switch (Node->ChildrenTypes[ChildIdx]) {
case CGForDotView::PointsTo: return "";
case CGForDotView::Defered: return "color=\"gray\"";
case CGForDotView::Deferred: return "color=\"gray\"";
}
}
};
Expand Down Expand Up @@ -930,7 +930,7 @@ void EscapeAnalysis::ConnectionGraph::verifyStructure() const {
for (Predecessor Pred : Nd->Preds) {
CGNode *PredNode = Pred.getPointer();
if (Pred.getInt() == EdgeType::Defer) {
assert(PredNode->findDefered(Nd) != PredNode->defersTo.end());
assert(PredNode->findDeferred(Nd) != PredNode->defersTo.end());
} else {
assert(Pred.getInt() == EdgeType::PointsTo);
assert(PredNode->getPointsToEdge() == Nd);
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5618,7 +5618,7 @@ bool TypeChecker::isAvailabilitySafeForConformance(
return true;

NominalTypeDecl *conformingDecl = DC->isNominalTypeOrNominalTypeExtensionContext();
assert(conformingDecl && "Must have conformining declaration");
assert(conformingDecl && "Must have conforming declaration");

// Make sure that any access of the witness through the protocol
// can only occur when the witness is available. That is, make sure that
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/Index.swift
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public protocol _RandomAccessAmbiguity {
extension _RandomAccessAmbiguity {
@warn_unused_result
public func advancedBy(n: Distance) -> Self {
fatalError("advancedBy(n) not implememented")
fatalError("advancedBy(n) not implemented")
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/SourceKit/lib/SwiftLang/SwiftCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ bool SwiftToSourceKitCompletionAdapter::handleResult(
llvm::SmallString<64> LogMessage;
llvm::raw_svector_ostream LogMessageOs(LogMessage);

LogMessageOs << "Code cpompletion result with empty name and/or "
LogMessageOs << "Code completion result with empty name and/or "
"description was ignored: \n";
Result->print(LogMessageOs);

Expand Down

0 comments on commit d89b4d4

Please sign in to comment.