summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ADT/ImmutableSet.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index e7d5e55ed6c..87026f019fe 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/include/llvm/ADT/ImmutableSet.h
@@ -654,7 +654,6 @@ public:
Flags=0x3 };
typedef ImutAVLTree<ImutInfo> TreeTy;
- typedef ImutAVLTreeGenericIterator<ImutInfo> SelfTy;
ImutAVLTreeGenericIterator() {}
ImutAVLTreeGenericIterator(const TreeTy *Root) {
@@ -696,11 +695,15 @@ public:
}
}
- bool operator==(const SelfTy &x) const { return stack == x.stack; }
+ bool operator==(const ImutAVLTreeGenericIterator &x) const {
+ return stack == x.stack;
+ }
- bool operator!=(const SelfTy &x) const { return !operator==(x); }
+ bool operator!=(const ImutAVLTreeGenericIterator &x) const {
+ return !(*this == x);
+ }
- SelfTy &operator++() {
+ ImutAVLTreeGenericIterator &operator++() {
assert(!stack.empty());
TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -726,7 +729,7 @@ public:
return *this;
}
- SelfTy &operator--() {
+ ImutAVLTreeGenericIterator &operator--() {
assert(!stack.empty());
TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -761,7 +764,6 @@ class ImutAVLTreeInOrderIterator
public:
typedef ImutAVLTree<ImutInfo> TreeTy;
- typedef ImutAVLTreeInOrderIterator<ImutInfo> SelfTy;
ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) {
if (Root)
@@ -770,16 +772,18 @@ public:
ImutAVLTreeInOrderIterator() : InternalItr() {}
- bool operator==(const SelfTy &x) const {
+ bool operator==(const ImutAVLTreeInOrderIterator &x) const {
return InternalItr == x.InternalItr;
}
- bool operator!=(const SelfTy &x) const { return !(*this == x); }
+ bool operator!=(const ImutAVLTreeInOrderIterator &x) const {
+ return !(*this == x);
+ }
TreeTy &operator*() const { return *InternalItr; }
TreeTy *operator->() const { return &*InternalItr; }
- SelfTy &operator++() {
+ ImutAVLTreeInOrderIterator &operator++() {
do ++InternalItr;
while (!InternalItr.atEnd() &&
InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);
@@ -787,7 +791,7 @@ public:
return *this;
}
- SelfTy &operator--() {
+ ImutAVLTreeInOrderIterator &operator--() {
do --InternalItr;
while (!InternalItr.atBeginning() &&
InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);
OpenPOWER on IntegriCloud