7 #ifndef RETDEC_LLVMIR2HLL_GRAPHS_CG_CG_WRITERS_GRAPHVIZ_CG_WRITER_H
8 #define RETDEC_LLVMIR2HLL_GRAPHS_CG_CG_WRITERS_GRAPHVIZ_CG_WRITER_H
32 virtual std::string
getId()
const override;
33 virtual bool emitCG()
override;
A representation of a call graph (CG).
A base class of all call graph (CG) writers.
A base class of all call graph (CG) writers.
Definition: cg_writer.h:27
std::ostream & out
Stream, where the resulting CG will be emitted.
Definition: cg_writer.h:53
ShPtr< CG > cg
CG to be emitted.
Definition: cg_writer.h:50
A CG writer in the dot format (graphviz).
Definition: graphviz_cg_writer.h:28
virtual bool emitCG() override
Emits the given CG into the given output stream.
Definition: graphviz_cg_writer.cpp:66
std::string getNodeLabelForFunc(ShPtr< Function > func)
Returns a node label for the given function.
Definition: graphviz_cg_writer.cpp:162
GraphvizCGWriter(ShPtr< CG > cg, std::ostream &out)
Constructs a new graphviz CG writer.
Definition: graphviz_cg_writer.cpp:49
static ShPtr< CGWriter > create(ShPtr< CG > cg, std::ostream &out)
Creates a new graphviz CG writer.
Definition: graphviz_cg_writer.cpp:58
std::map< ShPtr< Function >, std::string > NodeLabelMapping
Mapping between a node and its label.
Definition: graphviz_cg_writer.h:37
void emitNode(ShPtr< Function > caller, ShPtr< CG::CalledFuncs > callees)
Emits the node given by caller and callees.
Definition: graphviz_cg_writer.cpp:144
virtual std::string getId() const override
Returns the ID of the writer.
Definition: graphviz_cg_writer.cpp:62
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.