From: David Majnemer Date: Sun, 15 Mar 2015 06:11:24 +0000 (+0000) Subject: Restore the gcc build X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f5cb5de29bc4f7d1ee69990ae11a53c4179cdbe3;p=oota-llvm.git Restore the gcc build git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232314 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index eee3ff9230f..a7444117b11 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -652,6 +652,7 @@ public: Flags=0x3 }; typedef ImutAVLTree TreeTy; + typedef ImutAVLTreeGenericIterator Self; ImutAVLTreeGenericIterator() {} ImutAVLTreeGenericIterator(const TreeTy *Root) { @@ -692,15 +693,11 @@ public: } } - bool operator==(const ImutAVLTreeGenericIterator &x) const { - return stack == x.stack; - } + bool operator==(const Self &x) const { return stack == x.stack; } - bool operator!=(const ImutAVLTreeGenericIterator &x) const { - return !(*this == x); - } + bool operator!=(const Self &x) const { return !operator==(x); } - ImutAVLTreeGenericIterator &operator++() { + Self &operator++() { assert(!stack.empty()); TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); assert(Current); @@ -726,7 +723,7 @@ public: return *this; } - ImutAVLTreeGenericIterator &operator--() { + Self &operator--() { assert(!stack.empty()); TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); assert(Current); @@ -759,7 +756,7 @@ class ImutAVLTreeInOrderIterator { public: typedef ImutAVLTree TreeTy; - typedef ImutAVLTreeInOrderIterator ImutAVLTreeGenericIterator; + typedef ImutAVLTreeInOrderIterator Self; ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) { if (Root) @@ -768,18 +765,14 @@ public: ImutAVLTreeInOrderIterator() : InternalItr() {} - bool operator==(const ImutAVLTreeGenericIterator &x) const { - return InternalItr == x.InternalItr; - } + bool operator==(const Self &x) const { return InternalItr == x.InternalItr; } - bool operator!=(const ImutAVLTreeGenericIterator &x) const { - return !(*this == x); - } + bool operator!=(const Self &x) const { return !(*this == x); } TreeTy *operator*() const { return *InternalItr; } TreeTy *operator->() const { return *InternalItr; } - ImutAVLTreeGenericIterator &operator++() { + Self &operator++() { do ++InternalItr; while (!InternalItr.atEnd() && InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft); @@ -787,7 +780,7 @@ public: return *this; } - ImutAVLTreeGenericIterator &operator--() { + Self &operator--() { do --InternalItr; while (!InternalItr.atBeginning() && InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft);