[llvm] r231142 - CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine
David Blaikie
dblaikie at gmail.com
Tue Mar 3 13:45:54 PST 2015
Author: dblaikie
Date: Tue Mar 3 15:45:54 2015
New Revision: 231142
URL: http://llvm.org/viewvc/llvm-project?rev=231142&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/IR/CFG.h
Modified: llvm/trunk/include/llvm/IR/CFG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/CFG.h?rev=231142&r1=231141&r2=231142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/CFG.h (original)
+++ llvm/trunk/include/llvm/IR/CFG.h Tue Mar 3 15:45:54 2015
@@ -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; }
More information about the llvm-commits
mailing list