diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-21 22:27:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-21 22:27:20 +0000 |
commit | 9c0b9bf2b5df5699c8c2b53dc5a32876f36043e2 (patch) | |
tree | 276a01bb7488d6319a7def2f346dffbbf2cd9962 /include/llvm | |
parent | ac2ecd0ba01f8900cb8e939fbc8cb076a8049ded (diff) | |
download | external_llvm-9c0b9bf2b5df5699c8c2b53dc5a32876f36043e2.zip external_llvm-9c0b9bf2b5df5699c8c2b53dc5a32876f36043e2.tar.gz external_llvm-9c0b9bf2b5df5699c8c2b53dc5a32876f36043e2.tar.bz2 |
Update comments and add warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/DSGraph.h | 7 | ||||
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSGraph.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/Analysis/DSGraph.h b/include/llvm/Analysis/DSGraph.h index 803c36f..d56c5c5 100644 --- a/include/llvm/Analysis/DSGraph.h +++ b/include/llvm/Analysis/DSGraph.h @@ -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(); } diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index 803c36f..d56c5c5 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -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(); } |