From 2d27e0d912771836904e90bc9ce50babe474bd66 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 11 Feb 2003 19:27:27 +0000 Subject: [PATCH] Minor tweaks to printing. Close the file before viewing it in viewGraph llvm-svn: 5535 --- lib/Analysis/DataStructure/Printer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 09748ff8397..6a85ded3312 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -47,6 +47,7 @@ static std::string getCaption(const DSNode *N, const DSGraph *G) { if (N->NodeType & DSNode::Incomplete ) OS << "I"; if (N->NodeType & DSNode::Modified ) OS << "M"; if (N->NodeType & DSNode::Read ) OS << "R"; + if (N->NodeType & DSNode::DEAD ) OS << ""; OS << "\n"; } @@ -64,7 +65,7 @@ struct DOTGraphTraits : public DefaultDOTGraphTraits { if (G->hasFunction()) return "Function " + G->getFunction().getName(); else - return "Globals graph"; + return "Global graph"; } static const char *getGraphProperties(const DSGraph *G) { @@ -189,6 +190,7 @@ void DSGraph::viewGraph() const { return; } print(F); + F.close(); if (system("dot -Tps /tmp/tempgraph.dot > /tmp/tempgraph.ps")) std::cerr << "Error running dot: 'dot' not in path?\n"; system("gv /tmp/tempgraph.ps");