clang API Documentation

Classes | Public Member Functions | Static Public Member Functions
clang::LiveVariables Class Reference

#include <LiveVariables.h>

Inheritance diagram for clang::LiveVariables:
Inheritance graph
[legend]
Collaboration diagram for clang::LiveVariables:
Collaboration graph
[legend]

List of all members.

Classes

class  LivenessValues
class  Observer

Public Member Functions

virtual ~LiveVariables ()
bool isLive (const CFGBlock *B, const VarDecl *D)
bool isLive (const Stmt *S, const VarDecl *D)
bool isLive (const Stmt *Loc, const Stmt *StmtVal)
void dumpBlockLiveness (const SourceManager &M)
void runOnAllBlocks (Observer &obs)

Static Public Member Functions

static LiveVariablescomputeLiveness (AnalysisDeclContext &analysisContext, bool killAtAssign)
 Compute the liveness information for a given CFG.
static LiveVariablescreate (AnalysisDeclContext &analysisContext)
static const void * getTag ()

Detailed Description

Definition at line 30 of file LiveVariables.h.


Constructor & Destructor Documentation

Definition at line 484 of file LiveVariables.cpp.


Member Function Documentation

LiveVariables * LiveVariables::computeLiveness ( AnalysisDeclContext analysisContext,
bool  killAtAssign 
) [static]
static LiveVariables* clang::LiveVariables::create ( AnalysisDeclContext analysisContext) [inline, static]

Reimplemented in clang::RelaxedLiveVariables.

Definition at line 98 of file LiveVariables.h.

References computeLiveness().

Print to stderr the liveness information associated with each basic block.

Definition at line 568 of file LiveVariables.cpp.

References getImpl().

const void * LiveVariables::getTag ( ) [static]

Reimplemented in clang::RelaxedLiveVariables.

Definition at line 614 of file LiveVariables.cpp.

bool LiveVariables::isLive ( const CFGBlock B,
const VarDecl D 
)

Return true if a variable is live at the end of a specified block.

Definition at line 177 of file LiveVariables.cpp.

References getImpl(), and isAlwaysAlive().

Referenced by clang::ento::SymbolReaper::isLive().

bool LiveVariables::isLive ( const Stmt S,
const VarDecl D 
)

Returns true if a variable is live at the beginning of the the statement. This query only works if liveness information has been recorded at the statement level (see runOnAllBlocks), and only returns liveness information for block-level expressions.

Definition at line 181 of file LiveVariables.cpp.

References getImpl(), isAlwaysAlive(), and S.

bool LiveVariables::isLive ( const Stmt Loc,
const Stmt StmtVal 
)

Returns true the block-level expression "value" is live before the given block-level expression (see runOnAllBlocks).

Definition at line 185 of file LiveVariables.cpp.

References getImpl().

Definition at line 476 of file LiveVariables.cpp.

References clang::CFG::begin(), clang::CFG::end(), and getImpl().


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