mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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:
parent
814f622526
commit
ba7beb084c
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user