diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-05 06:10:06 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-05 06:10:06 +0000 |
commit | e330adf842ef484320caf65f0bdbfb820723371c (patch) | |
tree | d6617e26c9bc7a1d3ef7d60c6058cb4e87f81eee /llvm/lib/Analysis/DataStructure/Printer.cpp | |
parent | 706bd5bf2bcb1eda2423746b046620bf56222189 (diff) | |
download | bcm5719-llvm-e330adf842ef484320caf65f0bdbfb820723371c.tar.gz bcm5719-llvm-e330adf842ef484320caf65f0bdbfb820723371c.zip |
Move the stuff that fixes the size, orientation & fonts of graphs to
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.
llvm-svn: 13366
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Printer.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Printer.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp index 03058fb3825..f6e073adce9 100644 --- a/llvm/lib/Analysis/DataStructure/Printer.cpp +++ b/llvm/lib/Analysis/DataStructure/Printer.cpp @@ -93,17 +93,12 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits { } } - static const char *getGraphProperties(const DSGraph *G) { - return "\tsize=\"10,7.5\";\n" - "\trotate=\"90\";\n"; - } - static std::string getNodeLabel(const DSNode *Node, const DSGraph *Graph) { return getCaption(Node, Graph); } static std::string getNodeAttributes(const DSNode *N) { - return "shape=Mrecord";//fontname=Courier"; + return "shape=Mrecord"; } /// addCustomGraphFeatures - Use this graph writing hook to emit call nodes @@ -234,7 +229,7 @@ void DSGraph::viewGraph() const { } print(F); F.close(); - if (system("dot -Tps /tmp/tempgraph.dot > /tmp/tempgraph.ps")) + if (system("dot -Tps -Gsize=10,7.5 -Grotate=90 /tmp/tempgraph.dot > /tmp/tempgraph.ps")) std::cerr << "Error running dot: 'dot' not in path?\n"; system("gv /tmp/tempgraph.ps"); system("rm /tmp/tempgraph.dot /tmp/tempgraph.ps"); |