Add operator= for type iterators to make them assignable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-10-13 15:34:17 +00:00
parent 814f622526
commit ba7beb084c

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); }