forked from OSchip/llvm-project
Add operator= for type iterators to make them assignable
llvm-svn: 9083
This commit is contained in:
parent
78cab97abb
commit
d6d5651acf
|
@ -251,6 +251,12 @@ private:
|
|||
TypeIterator(const Type *ty, unsigned idx) : Ty(ty), Idx(idx) {}
|
||||
~TypeIterator() {}
|
||||
|
||||
const _Self &operator=(const _Self &RHS) {
|
||||
assert(Ty == RHS.Ty && "Cannot assign from different types!");
|
||||
Idx = RHS.Idx;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator==(const _Self& x) const { return Idx == x.Idx; }
|
||||
bool operator!=(const _Self& x) const { return !operator==(x); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue