diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/CFGPrinter.cpp | 7 | ||||
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 9 |
2 files changed, 4 insertions, 12 deletions
diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp index 9530f5695a..ddd9851b74 100644 --- a/lib/Analysis/CFGPrinter.cpp +++ b/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"; diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 03058fb382..f6e073adce 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/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"); |