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/CFGPrinter.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/CFGPrinter.cpp')
-rw-r--r-- | llvm/lib/Analysis/CFGPrinter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp index 9530f5695ab..ddd9851b740 100644 --- a/llvm/lib/Analysis/CFGPrinter.cpp +++ b/llvm/lib/Analysis/CFGPrinter.cpp @@ -75,10 +75,6 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits { return OutStr; } - static std::string getNodeAttributes(const BasicBlock *N) { - return "fontname=Courier"; - } - static std::string getEdgeSourceLabel(const BasicBlock *Node, succ_const_iterator I) { // Label source of conditional branches with "T" or "F" @@ -155,7 +151,8 @@ void Function::viewCFG() const { std::cerr << "\n"; std::cerr << "Running 'dot' program... " << std::flush; - if (system(("dot -Tps " + Filename + " > /tmp/cfg.tempgraph.ps").c_str())) { + if (system(("dot -Tps -Nfontname=Courier -Gsize=7.5,10 " + Filename + + " > /tmp/cfg.tempgraph.ps").c_str())) { std::cerr << "Error running dot: 'dot' not in path?\n"; } else { std::cerr << "\n"; |