[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Reid Spencer
reid at x10sys.com
Wed Jul 13 19:19:24 PDT 2005
Also ...
On Wed, 2005-07-13 at 20:11 -0500, Chris Lattner wrote:
> @@ -116,10 +116,19 @@
> F.close();
> 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;
> if (system(("dot -Tps -Nfontname=Courier -Gsize=7.5,10 " + Filename
> + " > /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 {
> std::cerr << "\n";
> system("gv /tmp/dag.tempgraph.ps");
None of this code is portable because of the use of the system call. I
know its convenient but windows doesn't have it. We have a facility in
lib/Support for executing external programs. You should use it.
Reid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20050713/f4a656bd/attachment.sig>
More information about the llvm-commits
mailing list