aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure
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
commit2cec1d386720f84a9bf034c27a17cff35ebb3e63 (patch)
tree17d166fd9e40df3de1b2c831a6ed086b67bf2745 /lib/Analysis/DataStructure
parentd3c2e3237c00102f435cd7ebf44f80b0747435d3 (diff)
downloadexternal_llvm-2cec1d386720f84a9bf034c27a17cff35ebb3e63.zip
external_llvm-2cec1d386720f84a9bf034c27a17cff35ebb3e63.tar.gz
external_llvm-2cec1d386720f84a9bf034c27a17cff35ebb3e63.tar.bz2
Minor tweaks to printing. Close the file before viewing it in viewGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r--lib/Analysis/DataStructure/Printer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp
index 09748ff..6a85ded 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 << "<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");