From: David Blaikie Date: Tue, 3 Mar 2015 21:17:00 +0000 (+0000) Subject: Remove the explicit SUnitIterator::operator= as the default is just fine X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=113c43b2c627d4405a34b9e33b74e78cd58e8b80;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231134 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 80aee8c6288..83913141656 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -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(); }