[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Chris Lattner sabre at nondot.org
Wed Jul 13 21:09:33 PDT 2005


On Wed, 13 Jul 2005, Reid Spencer wrote:
>>    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.

I'm not convinced.  Windows won't have 'gv' or 'Graphviz' either.  I'd be 
happy to make the second one depend on gv being found by autoconf though.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-commits mailing list