summaryrefslogtreecommitdiff
path: root/include/llvm/Support/DOTGraphTraits.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-12-01 11:07:05 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-12-01 11:07:05 +0000
commit06f9d4012fb8acea3e9861d5722b5965dbb724d9 (patch)
treeffe0478472eaa0686f11cb02c6df7d257b8719b0 /include/llvm/Support/DOTGraphTraits.h
parent76e2e0ebfdd3d91b07a75822865ea3e9121a99ce (diff)
Notes
Diffstat (limited to 'include/llvm/Support/DOTGraphTraits.h')
-rw-r--r--include/llvm/Support/DOTGraphTraits.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/llvm/Support/DOTGraphTraits.h b/include/llvm/Support/DOTGraphTraits.h
index 080297f8297e..54ced15321d1 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:
+ DefaultDOTGraphTraits (bool simple=false) : IsSimple (simple) {}
+
/// getGraphName - Return the label for the graph as a whole. Printed at the
/// top of the graph.
///
@@ -51,8 +62,7 @@ struct DefaultDOTGraphTraits {
/// 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, bool ShortNames) {
+ std::string getNodeLabel(const void *Node, const GraphType& Graph) {
return "";
}
@@ -135,7 +145,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