7 #ifndef RETDEC_LLVMIR2HLL_GRAPHS_CFG_CFG_WRITERS_GRAPHVIZ_CFG_WRITER_H
8 #define RETDEC_LLVMIR2HLL_GRAPHS_CFG_CFG_WRITERS_GRAPHVIZ_CFG_WRITER_H
34 virtual std::string
getId()
const override;
35 virtual bool emitCFG()
override;
39 using NodeSet = std::set<ShPtr<CFG::Node>>;
A base class of all control-flow graph (CFG) writers.
A base class of all control-flow graph (CFG) writers.
Definition: cfg_writer.h:28
ShPtr< CFG > cfg
CFG to be emitted.
Definition: cfg_writer.h:55
std::ostream & out
Stream, where the resulting CFG will be emitted.
Definition: cfg_writer.h:58
A CFG writer in the dot format (graphviz).
Definition: graphviz_cfg_writer.h:30
void emitNode(ShPtr< CFG::Node > node)
Emits the given node to out.
Definition: graphviz_cfg_writer.cpp:168
virtual bool emitCFG() override
Emits the given CFG into the given output stream.
Definition: graphviz_cfg_writer.cpp:111
std::set< ShPtr< CFG::Node > > NodeSet
Set of nodes.
Definition: graphviz_cfg_writer.h:39
static ShPtr< CFGWriter > create(ShPtr< CFG > cfg, std::ostream &out)
Creates a new graphviz CFG writer.
Definition: graphviz_cfg_writer.cpp:103
virtual std::string getId() const override
Returns the ID of the writer.
Definition: graphviz_cfg_writer.cpp:107
void emitStmt(ShPtr< Statement > stmt)
Emits the given statement to out.
Definition: graphviz_cfg_writer.cpp:200
void emitNodesByBreathFirstTraversal(ShPtr< CFG::Node > startNode, NodeSet &emittedNodes)
Emits nodes starting from startNode by using a breadth-first traversal.
Definition: graphviz_cfg_writer.cpp:142
void emitEdge(ShPtr< CFG::Edge > edge)
Emits the given edge to out.
Definition: graphviz_cfg_writer.cpp:188
GraphvizCFGWriter(ShPtr< CFG > cfg, std::ostream &out)
Constructs a new graphviz CFG writer.
Definition: graphviz_cfg_writer.cpp:94
A library providing API for working with back-end IR.
std::shared_ptr< T > ShPtr
An alias for a shared pointer.
Definition: smart_ptr.h:18
Definition: archive_wrapper.h:19
Declarations, aliases, macros, etc. for the use of smart pointers.