[llvm] r232317 - ImmutableSet: Rename Self to SelfTy to make it more clear it is a type
David Majnemer
david.majnemer at gmail.com
Sun Mar 15 00:09:20 PDT 2015
Author: majnemer
Date: Sun Mar 15 02:09:20 2015
New Revision: 232317
URL: http://llvm.org/viewvc/llvm-project?rev=232317&view=rev
Log:
ImmutableSet: Rename Self to SelfTy to make it more clear it is a type
No functional change intended.
Modified:
llvm/trunk/include/llvm/ADT/ImmutableSet.h
Modified: llvm/trunk/include/llvm/ADT/ImmutableSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableSet.h?rev=232317&r1=232316&r2=232317&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableSet.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableSet.h Sun Mar 15 02:09:20 2015
@@ -652,7 +652,7 @@ public:
Flags=0x3 };
typedef ImutAVLTree<ImutInfo> TreeTy;
- typedef ImutAVLTreeGenericIterator<ImutInfo> Self;
+ typedef ImutAVLTreeGenericIterator<ImutInfo> SelfTy;
ImutAVLTreeGenericIterator() {}
ImutAVLTreeGenericIterator(const TreeTy *Root) {
@@ -693,11 +693,11 @@ public:
}
}
- bool operator==(const Self &x) const { return stack == x.stack; }
+ bool operator==(const SelfTy &x) const { return stack == x.stack; }
- bool operator!=(const Self &x) const { return !operator==(x); }
+ bool operator!=(const SelfTy &x) const { return !operator==(x); }
- Self &operator++() {
+ SelfTy &operator++() {
assert(!stack.empty());
TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -723,7 +723,7 @@ public:
return *this;
}
- Self &operator--() {
+ SelfTy &operator--() {
assert(!stack.empty());
TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -756,7 +756,7 @@ class ImutAVLTreeInOrderIterator {
public:
typedef ImutAVLTree<ImutInfo> TreeTy;
- typedef ImutAVLTreeInOrderIterator<ImutInfo> Self;
+ typedef ImutAVLTreeInOrderIterator<ImutInfo> SelfTy;
ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) {
if (Root)
@@ -765,14 +765,16 @@ public:
ImutAVLTreeInOrderIterator() : InternalItr() {}
- bool operator==(const Self &x) const { return InternalItr == x.InternalItr; }
+ bool operator==(const SelfTy &x) const {
+ return InternalItr == x.InternalItr;
+ }
- bool operator!=(const Self &x) const { return !(*this == x); }
+ bool operator!=(const SelfTy &x) const { return !(*this == x); }
TreeTy *operator*() const { return *InternalItr; }
TreeTy *operator->() const { return *InternalItr; }
- Self &operator++() {
+ SelfTy &operator++() {
do ++InternalItr;
while (!InternalItr.atEnd() &&
InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);
@@ -780,7 +782,7 @@ public:
return *this;
}
- Self &operator--() {
+ SelfTy &operator--() {
do --InternalItr;
while (!InternalItr.atBeginning() &&
InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);
More information about the llvm-commits
mailing list