Nearly CC
An educational compiler skeleton
Public Member Functions | List of all members
ControlFlowGraphPrinter< Formatter, BlockAnnotator > Class Template Reference

Print a textual representation of a ControlFlowGraph. More...

#include "cfg_printer.h"

Public Member Functions

 ControlFlowGraphPrinter (const std::shared_ptr< ControlFlowGraph > &cfg, Formatter formatter=Formatter(), BlockAnnotator annotator=BlockAnnotator())
 Constructor. More...
 
void print ()
 Print the ControlFlowGraph to the standard output.
 

Detailed Description

template<typename Formatter, typename BlockAnnotator = DefaultBlockAnnotator>
class ControlFlowGraphPrinter< Formatter, BlockAnnotator >

Print a textual representation of a ControlFlowGraph.

Template Parameters
Formatterthe Formatter to use for converting an Instruction to its textual representation (either HighLevelFormatter or LowLevelFormatter)
BlockAnnotatorthe annotator to use to annotate instructions

Constructor & Destructor Documentation

◆ ControlFlowGraphPrinter()

template<typename Formatter , typename BlockAnnotator >
ControlFlowGraphPrinter< Formatter, BlockAnnotator >::ControlFlowGraphPrinter ( const std::shared_ptr< ControlFlowGraph > &  cfg,
Formatter  formatter = Formatter(),
BlockAnnotator  annotator = BlockAnnotator() 
)

Constructor.

Parameters
cfgshared pointer to the ControlFlowGraph to print
formatterthe Formatter to use
annotatorthe annotator to use to annotate basic blocks

The documentation for this class was generated from the following file: