[llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h

Chris Lattner lattner at cs.uiuc.edu
Sat Feb 21 16:31:24 PST 2004


Changes in directory llvm/include/llvm/Analysis:

DSGraph.h updated: 1.75 -> 1.76

---
Log message:

Update comments and add warning


---
Diffs of the changes:  (+5 -2)

Index: llvm/include/llvm/Analysis/DSGraph.h
diff -u llvm/include/llvm/Analysis/DSGraph.h:1.75 llvm/include/llvm/Analysis/DSGraph.h:1.76
--- llvm/include/llvm/Analysis/DSGraph.h:1.75	Thu Feb 19 15:27:50 2004
+++ llvm/include/llvm/Analysis/DSGraph.h	Sat Feb 21 16:27:20 2004
@@ -178,8 +178,11 @@
   void setPrintAuxCalls() { PrintAuxCalls = true; }
   bool shouldPrintAuxCalls() const { return PrintAuxCalls; }
 
-  /// getNodes - Get a vector of all the nodes in the graph
-  /// 
+  /// node_iterator/begin/end - Iterate over all of the nodes in the graph.  Be
+  /// extremely careful with these methods because any merging of nodes could
+  /// 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(); }





More information about the llvm-commits mailing list