Move maskNodeTypes from cpp file
authorChris Lattner <sabre@nondot.org>
Sat, 9 Nov 2002 21:02:30 +0000 (21:02 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 9 Nov 2002 21:02:30 +0000 (21:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4662 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 3ec567e6655d13a68b71a3730940fc10167cd71c..1c7f77fd23f0560ded30017baefa8c1eebe6db1e 100644 (file)
@@ -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
index 3ec567e6655d13a68b71a3730940fc10167cd71c..1c7f77fd23f0560ded30017baefa8c1eebe6db1e 100644 (file)
@@ -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