Emit a dot file from llvm pass

Hi,

I know that from your llvm pass you can call : viewCFG() or viewCFGOnly to view a graphviz representation of a function. These creates and store the .dot files somewhere in the \tmp folder under linux. Is there any way to specify in which file to save the .dot code?

Thank you,
Kyriakos

Hi,

you could mimic the code from CFGPrinter.cpp, line 80.

http://llvm.org/docs/doxygen/html/CFGPrinter_8cpp_source.html

It uses the interface from GraphWriter.h

Regards,

Victor.