[llvm] r231134 - Remove the explicit SUnitIterator::operator= as the default is just fine

David Blaikie dblaikie at gmail.com
Tue Mar 3 13:17:00 PST 2015


Author: dblaikie
Date: Tue Mar  3 15:17:00 2015
New Revision: 231134

URL: http://llvm.org/viewvc/llvm-project?rev=231134&view=rev
Log:
Remove the explicit SUnitIterator::operator= as the default is just fine

There doesn't seem to be any need to assert that iterator assignment is
between iterators over the same node - if you want to reuse an iterator
variable to iterate another node, that's perfectly acceptable. Just
don't mix comparisons between iterators into disjoint sequences, as
usual.

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=231134&r1=231133&r2=231134&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Tue Mar  3 15:17:00 2015
@@ -628,12 +628,6 @@ namespace llvm {
     }
     bool operator!=(const SUnitIterator& x) const { return !operator==(x); }
 
-    const SUnitIterator &operator=(const SUnitIterator &I) {
-      assert(I.Node==Node && "Cannot assign iterators to two different nodes!");
-      Operand = I.Operand;
-      return *this;
-    }
-
     pointer operator*() const {
       return Node->Preds[Operand].getSUnit();
     }





More information about the llvm-commits mailing list