From ba7beb084c7570cc2259cb97bf8266cf4fddc03d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 13 Oct 2003 15:34:17 +0000 Subject: [PATCH] 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 --- include/llvm/Type.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Type.h b/include/llvm/Type.h index fe6db028b46..91b17c0b09b 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -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); }