#include <GraphPrinter.h>
|
template<class GraphType > |
static void | WriteGraphToFile (llvm::raw_ostream &O, const std::string &GraphName, const GraphType >, bool simple=false) |
|
template<class GraphType > |
static void | PrintGraph (llvm::raw_ostream &O, const std::string &GraphName, const GraphType >) |
|
Definition at line 44 of file GraphPrinter.h.
◆ GraphPrinter()
llvm::GraphPrinter::GraphPrinter |
( |
| ) |
|
|
inline |
◆ PrintGraph()
template<class GraphType >
static void llvm::GraphPrinter::PrintGraph |
( |
llvm::raw_ostream & |
O, |
|
|
const std::string & |
GraphName, |
|
|
const GraphType & |
GT |
|
) |
| |
|
inlinestatic |
Print the graph to command line
Define the GTraits and node iterator for printing
Definition at line 85 of file GraphPrinter.h.
89 typedef llvm::GraphTraits<GraphType> GTraits;
91 typedef typename GTraits::NodeRef NodeRef;
92 typedef typename GTraits::nodes_iterator node_iterator;
93 typedef typename GTraits::ChildIteratorType child_iterator;
95 O <<
"Printing VFG Graph" <<
"'...\n";
97 node_iterator I = GTraits::nodes_begin(GT);
98 node_iterator E = GTraits::nodes_end(GT);
102 O <<
"node :" << Node <<
"'\n";
103 child_iterator EI = GTraits::child_begin(Node);
104 child_iterator EE = GTraits::child_end(Node);
105 for (
unsigned i = 0; EI != EE && i != 64; ++EI, ++i)
107 O <<
"child :" << *EI <<
"'\n";
◆ WriteGraphToFile()
template<class GraphType >
static void llvm::GraphPrinter::WriteGraphToFile |
( |
llvm::raw_ostream & |
O, |
|
|
const std::string & |
GraphName, |
|
|
const GraphType & |
GT, |
|
|
bool |
simple = false |
|
) |
| |
|
inlinestatic |
Write the graph into dot file for debugging purpose
Definition at line 56 of file GraphPrinter.h.
60 std::string Filename = GraphName +
".dot";
61 O <<
"Writing '" << Filename <<
"'...";
62 std::error_code ErrInfo;
68 WriteGraph(F.os(), GT, simple);
70 if (!F.os().has_error())
77 O <<
" error opening file for writing!\n";
llvm::ToolOutputFile ToolOutputFile
The documentation for this class was generated from the following file: