Add support for emitting ARM file attributes.
[oota-llvm.git] / include / llvm / Support / DOTGraphTraits.h
index 2367c0e260c51f7b6dff3d1840d658f0e4cbbeba..796c74a21ca86d5168cc21e98d469d4e237b433c 100644 (file)
@@ -27,6 +27,17 @@ namespace llvm {
 /// implementations.
 ///
 struct DefaultDOTGraphTraits {
+private:
+  bool IsSimple;
+
+protected:
+  bool isSimple() {
+    return IsSimple;
+  }
+
+public:
+  explicit DefaultDOTGraphTraits(bool simple=false) : IsSimple (simple) {}
+
   /// getGraphName - Return the label for the graph as a whole.  Printed at the
   /// top of the graph.
   ///
@@ -48,13 +59,19 @@ struct DefaultDOTGraphTraits {
     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>
-  static std::string getNodeLabel(const void *Node, const GraphType& Graph) {
+  std::string getNodeLabel(const void *Node, const GraphType& Graph) {
     return "";
   }
-  
+
   /// hasNodeAddressLabel - If this method returns true, the address of the node
   /// is added to the label of the node.
   template<typename GraphType>
@@ -134,7 +151,9 @@ struct DefaultDOTGraphTraits {
 /// from DefaultDOTGraphTraits if you don't need to override everything.
 ///
 template <typename Ty>
-struct DOTGraphTraits : public DefaultDOTGraphTraits {};
+struct DOTGraphTraits : public DefaultDOTGraphTraits {
+  DOTGraphTraits (bool simple=false) : DefaultDOTGraphTraits (simple) {}
+};
 
 } // End llvm namespace