CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 21:45:54 +0000 (21:45 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 3 Mar 2015 21:45:54 +0000 (21:45 +0000)
There's no reason to disallow assigning an iterator from one range to an
iterator that previously iterated over a disjoint range. This then
follows the Rule of Zero, allowing implicit copy construction to be used
without hitting the case that's deprecated in C++11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231142 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/CFG.h

index 56c650323e36cb39237b8b929d7bf27a62cd2fa6..e958847eb628da3ae32556ed22c8f316da4233cb 100644 (file)
@@ -167,12 +167,6 @@ public:
       idx = 0;
   }
 
-  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; }