Skip to content

Commit

Permalink
Remove explicit RNSuccIterator copy assignment in favor of implicit d…
Browse files Browse the repository at this point in the history
…efault

Asserting that the source and destination iterators are from the same
region is unnecessary - there's no reason to disallow reassignment from
any regions, so long as they aren't compared.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231224 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dwblaikie committed Mar 4, 2015
1 parent 5651a7b commit ee118f3
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions include/llvm/Analysis/RegionIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,6 @@ class RNSuccIterator : public std::iterator<std::forward_iterator_tag,
++*this;
return tmp;
}

inline const Self &operator=(const Self &I) {
if (this != &I) {
assert(getNode()->getParent() == I.getNode()->getParent()
&& "Cannot assign iterators of two different regions!");
Node = I.Node;
BItor = I.BItor;
}
return *this;
}
};


Expand Down Expand Up @@ -240,16 +230,6 @@ class RNSuccIterator<FlatIt<NodeType>, BlockT, RegionT>
++*this;
return tmp;
}

inline const Self &operator=(const Self &I) {
if (this != &I) {
assert(Node->getParent() == I.Node->getParent()
&& "Cannot assign iterators to two different regions!");
Node = I.Node;
Itor = I.Itor;
}
return *this;
}
};

template<class NodeType, class BlockT, class RegionT>
Expand Down

0 comments on commit ee118f3

Please sign in to comment.