[llvm] r222446 - Update template specialization to reflect API changes.

Michael Ilseman milseman at apple.com
Thu Nov 20 11:33:31 PST 2014


Author: milseman
Date: Thu Nov 20 13:33:30 2014
New Revision: 222446

URL: http://llvm.org/viewvc/llvm-project?rev=222446&view=rev
Log:
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.

Modified:
    llvm/trunk/include/llvm/ADT/PostOrderIterator.h

Modified: llvm/trunk/include/llvm/ADT/PostOrderIterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PostOrderIterator.h?rev=222446&r1=222445&r2=222446&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PostOrderIterator.h (original)
+++ llvm/trunk/include/llvm/ADT/PostOrderIterator.h Thu Nov 20 13:33:30 2014
@@ -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<class NodeType>
-  bool insertEdge(NodeType *From, NodeType *To) { return Visited.insert(To); }
+  template <class NodeType> bool insertEdge(NodeType *From, NodeType *To) {
+    return Visited.insert(To).second;
+  }
 
   // Called after all children of BB have been visited.
   template<class NodeType>





More information about the llvm-commits mailing list