LLVM API Documentation

CFGPrinter.cpp File Reference

#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Config/config.h"
#include <sstream>
#include <fstream>

Include dependency graph for CFGPrinter.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  llvm::DOTGraphTraits< const Function * >

Functions

FunctionPassllvm::createCFGPrinterPass ()
FunctionPassllvm::createCFGOnlyPrinterPass ()

Variables

static bool CFGOnly = false
RegisterAnalysis< CFGPrinter > P1 ("print-cfg","Print CFG of function to 'dot' file")
RegisterAnalysis< CFGOnlyPrinter > P2 ("print-cfg-only","Print CFG of function to 'dot' file (with no function bodies)")


Variable Documentation

bool CFGOnly = false [static]

CFGOnly flag - This is used to control whether or not the CFG graph printer prints out the contents of basic blocks or not. This is acceptable because this code is only really used for debugging purposes.

Definition at line 36 of file CFGPrinter.cpp.

Referenced by llvm::DOTGraphTraits< const Function * >::getNodeLabel(), llvm::RegisterAnalysis< PassName >::RegisterAnalysis(), llvm::RegisterOpt< PassName >::RegisterOpt(), and llvm::Function::viewCFGOnly().

RegisterAnalysis<CFGPrinter> P1("print-cfg","Print CFG of function to 'dot' file") [static]

RegisterAnalysis<CFGOnlyPrinter> P2("print-cfg-only","Print CFG of function to 'dot' file (with no function bodies)") [static]