aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-13 15:34:17 +0000
committerChris Lattner <sabre@nondot.org>2003-10-13 15:34:17 +0000
commitba7beb084c7570cc2259cb97bf8266cf4fddc03d (patch)
treeb45543d6646775a5895dc331debd3ed7ace33342
parent814f6225261d7a8de1e8747a20625ab0ef6332de (diff)
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
-rw-r--r--include/llvm/Type.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Type.h b/include/llvm/Type.h
index fe6db028b4..91b17c0b09 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); }