17 #include "llvm/Support/GraphWriter.h" 19 using namespace clang;
23 llvm::ViewGraph(
this,
"AST");
25 llvm::errs() <<
"Stmt::viewAST is only available in debug builds on " 26 <<
"systems with Graphviz or gv!\n";
39 llvm::raw_string_ostream Out(OutSStr);
46 std::string OutStr = Out.str();
47 if (OutStr[0] ==
'\n') OutStr.erase(OutStr.begin());
50 for (
unsigned i = 0; i != OutStr.length(); ++i)
51 if (OutStr[i] ==
'\n') {
53 OutStr.insert(OutStr.begin()+i+1,
'l');
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
Stmt - This represents one statement.
const char * getStmtClassName() const
static std::string getNodeLabel(const Stmt *Node, const Stmt *Graph)
ast_type_traits::DynTypedNode Node
Dataflow Directional Tag Classes.
DOTGraphTraits(bool isSimple=false)
void viewAST() const
viewAST - Visualize an AST rooted at this Stmt* using GraphViz.