mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-28 14:36:34 +00:00
Minor tweaks to printing. Close the file before viewing it in viewGraph
llvm-svn: 5535
This commit is contained in:
parent
d4faf8a5da
commit
2d27e0d912
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user