mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
If the Graphviz program is available, use it to visualize dot graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6fb0d735f0
commit
f1a2f15ed3
@ -116,10 +116,19 @@ void SelectionDAG::viewGraph() {
|
|||||||
F.close();
|
F.close();
|
||||||
std::cerr << "\n";
|
std::cerr << "\n";
|
||||||
|
|
||||||
|
#ifdef HAVE_GRAPHVIZ
|
||||||
|
std::cerr << "Running 'Graphviz' program... " << std::flush;
|
||||||
|
if (system(("Graphviz " + Filename).c_str())) {
|
||||||
|
std::cerr << "Error viewing graph: 'Graphviz' not in path?\n";
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::cerr << "Running 'dot' program... " << std::flush;
|
std::cerr << "Running 'dot' program... " << std::flush;
|
||||||
if (system(("dot -Tps -Nfontname=Courier -Gsize=7.5,10 " + Filename
|
if (system(("dot -Tps -Nfontname=Courier -Gsize=7.5,10 " + Filename
|
||||||
+ " > /tmp/dag.tempgraph.ps").c_str())) {
|
+ " > /tmp/dag.tempgraph.ps").c_str())) {
|
||||||
std::cerr << "Error running dot: 'dot' not in path?\n";
|
std::cerr << "Error viewing graph: 'dot' not in path?\n";
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "\n";
|
std::cerr << "\n";
|
||||||
system("gv /tmp/dag.tempgraph.ps");
|
system("gv /tmp/dag.tempgraph.ps");
|
||||||
|
Loading…
Reference in New Issue
Block a user