X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fllvm%2FSupport%2FDOTGraphTraits.h;h=3cb8164c3c3dd57c277b804a39c95afa567c598b;hb=71280b55a3406c7dd4215449bf4a3ab216e78ffd;hp=2367c0e260c51f7b6dff3d1840d658f0e4cbbeba;hpb=358033102ffaef4d1afb1c0b7e96440906f0b48f;p=oota-llvm.git diff --git a/include/llvm/Support/DOTGraphTraits.h b/include/llvm/Support/DOTGraphTraits.h index 2367c0e260c..3cb8164c3c3 100644 --- a/include/llvm/Support/DOTGraphTraits.h +++ b/include/llvm/Support/DOTGraphTraits.h @@ -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 - 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 @@ -72,8 +89,9 @@ struct DefaultDOTGraphTraits { /// If you want to override the dot attributes printed for a particular edge, /// override this method. - template - static std::string getEdgeAttributes(const void *Node, EdgeIter EI) { + template + static std::string getEdgeAttributes(const void *Node, EdgeIter EI, + const GraphType& Graph) { return ""; } @@ -134,7 +152,9 @@ struct DefaultDOTGraphTraits { /// from DefaultDOTGraphTraits if you don't need to override everything. /// template -struct DOTGraphTraits : public DefaultDOTGraphTraits {}; +struct DOTGraphTraits : public DefaultDOTGraphTraits { + DOTGraphTraits (bool simple=false) : DefaultDOTGraphTraits (simple) {} +}; } // End llvm namespace