aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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); }