[llvm] r231138 - Remove the explicit SDNodeIterator::operator= in favor of the implicit default

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


Author: dblaikie
Date: Tue Mar  3 15:26:17 2015
New Revision: 231138

URL: http://llvm.org/viewvc/llvm-project?rev=231138&view=rev
Log:
Remove the explicit SDNodeIterator::operator= in favor of the implicit default

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/SelectionDAGNodes.h

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=231138&r1=231137&r2=231138&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Tue Mar  3 15:26:17 2015
@@ -2063,12 +2063,6 @@ public:
   }
   bool operator!=(const SDNodeIterator& x) const { return !operator==(x); }
 
-  const SDNodeIterator &operator=(const SDNodeIterator &I) {
-    assert(I.Node == Node && "Cannot assign iterators to two different nodes!");
-    Operand = I.Operand;
-    return *this;
-  }
-
   pointer operator*() const {
     return Node->getOperand(Operand).getNode();
   }





More information about the llvm-commits mailing list