Skip to content

Commit 5b878ac

Browse files
authored
Merge pull request swiftlang#27539 from davezarzycki/pr27539
NFC: silence a few warnings
2 parents 2b04447 + df07883 commit 5b878ac

File tree

2 files changed

+2
-62
lines changed

2 files changed

+2
-62
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -539,66 +539,6 @@ void GenericSignatureBuilder::Implementation::deallocateEquivalenceClass(
539539
FreeEquivalenceClasses.push_back(equivClass);
540540
}
541541

542-
#pragma mark GraphViz visualization
543-
namespace {
544-
/// A node in the equivalence class, used for visualization.
545-
struct EquivalenceClassVizNode {
546-
const EquivalenceClass *first;
547-
Type second;
548-
549-
operator const void *() const { return second.getPointer(); }
550-
};
551-
552-
/// Iterator through the adjacent nodes in an equivalence class, for
553-
/// visualization.
554-
class EquivalenceClassVizIterator {
555-
using BaseIterator = const Constraint<Type> *;
556-
557-
EquivalenceClassVizNode node;
558-
BaseIterator base;
559-
560-
public:
561-
using difference_type = ptrdiff_t;
562-
using value_type = EquivalenceClassVizNode;
563-
using reference = value_type;
564-
using pointer = value_type*;
565-
using iterator_category = std::forward_iterator_tag;
566-
567-
EquivalenceClassVizIterator(EquivalenceClassVizNode node,
568-
BaseIterator base, BaseIterator baseEnd)
569-
: node(node), base(base) {
570-
}
571-
572-
BaseIterator &getBase() { return base; }
573-
const BaseIterator &getBase() const { return base; }
574-
575-
reference operator*() const {
576-
return { node.first, getBase()->value };
577-
}
578-
579-
EquivalenceClassVizIterator& operator++() {
580-
++getBase();
581-
return *this;
582-
}
583-
584-
EquivalenceClassVizIterator operator++(int) {
585-
EquivalenceClassVizIterator result = *this;
586-
++(*this);
587-
return result;
588-
}
589-
590-
friend bool operator==(const EquivalenceClassVizIterator &lhs,
591-
const EquivalenceClassVizIterator &rhs) {
592-
return lhs.getBase() == rhs.getBase();
593-
}
594-
595-
friend bool operator!=(const EquivalenceClassVizIterator &lhs,
596-
const EquivalenceClassVizIterator &rhs) {
597-
return !(lhs == rhs);
598-
}
599-
};
600-
}
601-
602542
namespace {
603543
/// Retrieve the type described by the given unresolved tyoe.
604544
Type getUnresolvedType(GSBUnresolvedType type,

lib/SILOptimizer/Utils/CFGOptUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace swift;
2727
///
2828
/// \param branch The terminator to add the argument to.
2929
/// \param dest The destination block of the edge.
30-
/// \param Val The value to the arguments of the branch.
30+
/// \param val The value to the arguments of the branch.
3131
/// \return The created branch. The old branch is deleted.
3232
/// The argument is appended at the end of the argument tuple.
3333
TermInst *swift::addNewEdgeValueToBranch(TermInst *branch, SILBasicBlock *dest,
@@ -268,7 +268,7 @@ replaceSwitchDest(SwitchEnumTy *sTy, SmallVectorImpl<SwitchEnumCaseTy> &cases,
268268

269269
/// Replace a branch target.
270270
///
271-
/// \param T The terminating instruction to modify.
271+
/// \param t The terminating instruction to modify.
272272
/// \param oldDest The successor block that will be replaced.
273273
/// \param newDest The new target block.
274274
/// \param preserveArgs If set, preserve arguments on the replaced edge.

0 commit comments

Comments
 (0)