16 #include "llvm/Support/GraphWriter.h" 18 using namespace clang;
22 llvm::ViewGraph(
this,
"AST");
24 llvm::errs() <<
"Stmt::viewAST is only available in debug builds on " 25 <<
"systems with Graphviz or gv!\n";
38 llvm::raw_string_ostream Out(OutSStr);
45 std::string OutStr = Out.str();
46 if (OutStr[0] ==
'\n') OutStr.erase(OutStr.begin());
49 for (
unsigned i = 0;
i != OutStr.length(); ++
i)
50 if (OutStr[
i] ==
'\n') {
52 OutStr.insert(OutStr.begin()+
i+1,
'l');
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
Stmt - This represents one statement.
DOTGraphTraits(bool isSimple=false)
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.