From deb068a5cb7b026b18438e031dfd1b0dfec13f57 Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Thu, 20 Nov 2014 19:33:30 +0000 Subject: [PATCH] Update template specialization to reflect API changes. po_iterator_storage's insertEdge was updated to reflect the API changes from many of our insert methods in r222334, however the template specialization for external storage was not updated. This updates the specialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222446 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/PostOrderIterator.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index f1a69c6b84e..dfadc3b85db 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -76,8 +76,9 @@ public: // Return true if edge destination should be visited, called with From = 0 for // the root node. // Graph edges can be pruned by specializing this function. - template - bool insertEdge(NodeType *From, NodeType *To) { return Visited.insert(To); } + template bool insertEdge(NodeType *From, NodeType *To) { + return Visited.insert(To).second; + } // Called after all children of BB have been visited. template -- 2.34.1