Update/correct comment.
[oota-llvm.git] / include / llvm / IR / CFG.h
index 9d4ee83bc79d2092dbd543252924913fecb0b92d..f78220a5203320dbbefe44f8bde947f8d86d1191 100644 (file)
@@ -121,7 +121,7 @@ public:
   typedef typename super::reference reference;
 
 private:
-  const Term_ Term;
+  Term_ Term;
   unsigned idx;
   typedef SuccIterator<Term_, BB_> Self;
 
@@ -132,13 +132,13 @@ private:
   /// \brief Proxy object to allow write access in operator[]
   class SuccessorProxy {
     Self it;
-    friend class SuccIterator;
-    SuccessorProxy(const SuccessorProxy&) = default;
 
   public:
     explicit SuccessorProxy(const Self &it) : it(it) {}
 
-    SuccessorProxy &operator=(const SuccessorProxy &r) {
+    SuccessorProxy(const SuccessorProxy&) = default;
+
+    SuccessorProxy &operator=(SuccessorProxy r) {
       *this = reference(r);
       return *this;
     }
@@ -167,14 +167,6 @@ public:
       idx = 0;
   }
 
-  SuccIterator(const SuccIterator&) = default;
-
-  inline const Self &operator=(const Self &I) {
-    assert(Term == I.Term &&"Cannot assign iterators to two different blocks!");
-    idx = I.idx;
-    return *this;
-  }
-
   /// getSuccessorIndex - This is used to interface between code that wants to
   /// operate on terminator instructions directly.
   unsigned getSuccessorIndex() const { return idx; }