[llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DSGraph.h DSGraphTraits.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Mar 16 14:42:19 PST 2005
Changes in directory llvm/include/llvm/Analysis/DataStructure:
DSGraph.h updated: 1.92 -> 1.93
DSGraphTraits.h updated: 1.22 -> 1.23
---
Log message:
remove use of compat_iterator
---
Diffs of the changes: (+11 -9)
DSGraph.h | 12 ++++++++----
DSGraphTraits.h | 8 +++-----
2 files changed, 11 insertions(+), 9 deletions(-)
Index: llvm/include/llvm/Analysis/DataStructure/DSGraph.h
diff -u llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.92 llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.93
--- llvm/include/llvm/Analysis/DataStructure/DSGraph.h:1.92 Tue Mar 15 11:52:07 2005
+++ llvm/include/llvm/Analysis/DataStructure/DSGraph.h Wed Mar 16 16:42:01 2005
@@ -204,9 +204,13 @@
/// cause the node to be removed from this list. This means that if you are
/// iterating over nodes and doing something that could cause _any_ node to
/// merge, your node_iterators into this graph can be invalidated.
- typedef NodeListTy::compat_iterator node_iterator;
- node_iterator node_begin() const { return Nodes.compat_begin(); }
- node_iterator node_end() const { return Nodes.compat_end(); }
+ typedef NodeListTy::iterator node_iterator;
+ node_iterator node_begin() { return Nodes.begin(); }
+ node_iterator node_end() { return Nodes.end(); }
+
+ typedef NodeListTy::const_iterator node_const_iterator;
+ node_const_iterator node_begin() const { return Nodes.begin(); }
+ node_const_iterator node_end() const { return Nodes.end(); }
/// getFunctionNames - Return a space separated list of the name of the
/// functions in this graph (if any)
@@ -337,7 +341,7 @@
///
void maskNodeTypes(unsigned Mask) {
for (node_iterator I = node_begin(), E = node_end(); I != E; ++I)
- (*I)->maskNodeTypes(Mask);
+ I->maskNodeTypes(Mask);
}
void maskIncompleteMarkers() { maskNodeTypes(~DSNode::Incomplete); }
Index: llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h
diff -u llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.22 llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.23
--- llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h:1.22 Wed Sep 1 17:55:34 2004
+++ llvm/include/llvm/Analysis/DataStructure/DSGraphTraits.h Wed Mar 16 16:42:01 2005
@@ -135,15 +135,13 @@
typedef const DSNode NodeType;
typedef DSNode::const_iterator ChildIteratorType;
- typedef std::pointer_to_unary_function<const DSNode *,const DSNode&> DerefFun;
-
// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
- typedef mapped_iterator<DSGraph::node_iterator, DerefFun> nodes_iterator;
+ typedef DSGraph::node_const_iterator nodes_iterator;
static nodes_iterator nodes_begin(const DSGraph *G) {
- return map_iterator(G->node_begin(), DerefFun(dereferenceC));
+ return G->node_begin();
}
static nodes_iterator nodes_end(const DSGraph *G) {
- return map_iterator(G->node_end(), DerefFun(dereferenceC));
+ return G->node_end();
}
static ChildIteratorType child_begin(const NodeType *N) { return N->begin(); }
More information about the llvm-commits
mailing list