Update comments and add warning
authorChris Lattner <sabre@nondot.org>
Sat, 21 Feb 2004 22:27:20 +0000 (22:27 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 21 Feb 2004 22:27:20 +0000 (22:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11691 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DSGraph.h
include/llvm/Analysis/DataStructure/DSGraph.h

index 803c36f5d8848cde19cfd86f2c01527820c0decb..d56c5c5c10dd6c3438102c42eeb209f87b17ba34 100644 (file)
@@ -178,8 +178,11 @@ public:
   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(); }
index 803c36f5d8848cde19cfd86f2c01527820c0decb..d56c5c5c10dd6c3438102c42eeb209f87b17ba34 100644 (file)
@@ -178,8 +178,11 @@ public:
   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(); }