Add operator= for type iterators to make them assignable

llvm-svn: 9083
This commit is contained in:
Chris Lattner 2003-10-13 15:34:17 +00:00
parent 78cab97abb
commit d6d5651acf
1 changed files with 6 additions and 0 deletions

View File

@ -250,6 +250,12 @@ private:
public:
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); }