summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-15 06:11:24 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-15 06:11:24 +0000
commit2b6dd685352ea992f675f5f7ba5a9de07fcb6e63 (patch)
tree4828ba0702691b9e93a96dfe4ae7538505260267
parent095a4c7b069910ab03c8146e0e468cdc58fec3ed (diff)
downloadbcm5719-llvm-2b6dd685352ea992f675f5f7ba5a9de07fcb6e63.tar.gz
bcm5719-llvm-2b6dd685352ea992f675f5f7ba5a9de07fcb6e63.zip
Restore the gcc build
llvm-svn: 232314
-rw-r--r--llvm/include/llvm/ADT/ImmutableSet.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index eee3ff9230f..a7444117b11 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/include/llvm/ADT/ImmutableSet.h
@@ -652,6 +652,7 @@ public:
Flags=0x3 };
typedef ImutAVLTree<ImutInfo> TreeTy;
+ typedef ImutAVLTreeGenericIterator<ImutInfo> 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<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -726,7 +723,7 @@ public:
return *this;
}
- ImutAVLTreeGenericIterator &operator--() {
+ Self &operator--() {
assert(!stack.empty());
TreeTy* Current = reinterpret_cast<TreeTy*>(stack.back() & ~Flags);
assert(Current);
@@ -759,7 +756,7 @@ class ImutAVLTreeInOrderIterator {
public:
typedef ImutAVLTree<ImutInfo> TreeTy;
- typedef ImutAVLTreeInOrderIterator<ImutInfo> ImutAVLTreeGenericIterator;
+ typedef ImutAVLTreeInOrderIterator<ImutInfo> 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);
OpenPOWER on IntegriCloud