diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-09 21:02:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-09 21:02:30 +0000 |
commit | dc26d45c710fda254b235852dc830f4b2e4bcb03 (patch) | |
tree | 3d5fde4172887bb9685c275c5171c83f2badb0ba /include | |
parent | 7900ed146f2a5d1f774d2e190e6b7a657207d54f (diff) |
Move maskNodeTypes from cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/DSGraph.h | 11 | ||||
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSGraph.h | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/include/llvm/Analysis/DSGraph.h b/include/llvm/Analysis/DSGraph.h index 3ec567e665..1c7f77fd23 100644 --- a/include/llvm/Analysis/DSGraph.h +++ b/include/llvm/Analysis/DSGraph.h @@ -109,10 +109,13 @@ public: void dump() const; void writeGraphToFile(std::ostream &O, const std::string &GraphName) const; - // maskNodeTypes - Apply a mask to all of the node types in the graph. This - // is useful for clearing out markers like Scalar or Incomplete. - // - void maskNodeTypes(unsigned char Mask); + /// maskNodeTypes - Apply a mask to all of the node types in the graph. This + /// is useful for clearing out markers like Incomplete. + /// + void maskNodeTypes(unsigned char Mask) { + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) + Nodes[i]->NodeType &= Mask; + } void maskIncompleteMarkers() { maskNodeTypes(~DSNode::Incomplete); } // markIncompleteNodes - Traverse the graph, identifying nodes that may be diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index 3ec567e665..1c7f77fd23 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -109,10 +109,13 @@ public: void dump() const; void writeGraphToFile(std::ostream &O, const std::string &GraphName) const; - // maskNodeTypes - Apply a mask to all of the node types in the graph. This - // is useful for clearing out markers like Scalar or Incomplete. - // - void maskNodeTypes(unsigned char Mask); + /// maskNodeTypes - Apply a mask to all of the node types in the graph. This + /// is useful for clearing out markers like Incomplete. + /// + void maskNodeTypes(unsigned char Mask) { + for (unsigned i = 0, e = Nodes.size(); i != e; ++i) + Nodes[i]->NodeType &= Mask; + } void maskIncompleteMarkers() { maskNodeTypes(~DSNode::Incomplete); } // markIncompleteNodes - Traverse the graph, identifying nodes that may be |