summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-02-11 19:27:27 +0000
committerChris Lattner <sabre@nondot.org>2003-02-11 19:27:27 +0000
commit763502671dda12adb4ef204ba6c92613176006ad (patch)
tree4b8d2358e709f1357cf423601dfe5c5459aaa6e8 /llvm/lib
parent1cc14aa2bac93d9dfc6d95c1eb9a2702b9f4780e (diff)
downloadbcm5719-llvm-763502671dda12adb4ef204ba6c92613176006ad.tar.gz
bcm5719-llvm-763502671dda12adb4ef204ba6c92613176006ad.zip
Minor tweaks to printing. Close the file before viewing it in viewGraph
llvm-svn: 5535
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/DataStructure/Printer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Printer.cpp b/llvm/lib/Analysis/DataStructure/Printer.cpp
index 09748ff8397..6a85ded3312 100644
--- a/llvm/lib/Analysis/DataStructure/Printer.cpp
+++ b/llvm/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 << "<dead>";
OS << "\n";
}
@@ -64,7 +65,7 @@ struct DOTGraphTraits<const DSGraph*> : 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");
OpenPOWER on IntegriCloud