Reinstate r133513 (reverted in r133700) with an additional fix for a
[oota-llvm.git] / include / llvm / Support / DOTGraphTraits.h
index 54ced15321d1a6144fcaf30b44dec4008f0e9793..3cb8164c3c3dd57c277b804a39c95afa567c598b 100644 (file)
@@ -36,7 +36,7 @@ protected:
   }
 
 public:
-  DefaultDOTGraphTraits (bool simple=false) : IsSimple (simple) {}
+  explicit DefaultDOTGraphTraits(bool simple=false) : IsSimple (simple) {}
 
   /// getGraphName - Return the label for the graph as a whole.  Printed at the
   /// top of the graph.
@@ -59,6 +59,12 @@ public:
     return false;
   }
 
+  /// isNodeHidden - If the function returns true, the given node is not
+  /// displayed in the graph.
+  static bool isNodeHidden(const void *Node) {
+    return false;
+  }
+
   /// getNodeLabel - Given a node and a pointer to the top level graph, return
   /// the label to print in the node.
   template<typename GraphType>
@@ -83,8 +89,9 @@ public:
 
   /// If you want to override the dot attributes printed for a particular edge,
   /// override this method.
-  template<typename EdgeIter>
-  static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
+  template<typename EdgeIter, typename GraphType>
+  static std::string getEdgeAttributes(const void *Node, EdgeIter EI,
+                                       const GraphType& Graph) {
     return "";
   }