From 017ba3988f764d090de3f3a2d5b52daca28cf2bf Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 3 Mar 2015 21:45:54 +0000 Subject: [PATCH] CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine 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 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/llvm/IR/CFG.h b/include/llvm/IR/CFG.h index 56c650323e3..e958847eb62 100644 --- a/include/llvm/IR/CFG.h +++ b/include/llvm/IR/CFG.h @@ -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; } -- 2.34.1