clang API Documentation

Classes | Public Types | Public Member Functions | Protected Member Functions | Friends
clang::threadSafety::LocalVariableMap Class Reference

List of all members.

Classes

struct  VarDefinition

Public Types

typedef LocalVarContext Context

Public Member Functions

 LocalVariableMap ()
const VarDefinitionlookup (const NamedDecl *D, Context Ctx)
 Look up a definition, within the given context.
const ExprlookupExpr (const NamedDecl *D, Context &Ctx)
Context getEmptyContext ()
Context getNextContext (unsigned &CtxIndex, Stmt *S, Context C)
void dumpVarDefinitionName (unsigned i)
void dump ()
 Dumps an ASCII representation of the variable map to llvm::errs()
void dumpContext (Context C)
 Dumps an ASCII representation of a Context to llvm::errs()
void traverseCFG (CFG *CFGraph, const PostOrderCFGView *SortedGraph, std::vector< CFGBlockInfo > &BlockInfo)
 Builds the variable map.

Protected Member Functions

unsigned getContextIndex ()
void saveContext (Stmt *S, Context C)
Context addDefinition (const NamedDecl *D, const Expr *Exp, Context Ctx)
Context addReference (const NamedDecl *D, unsigned i, Context Ctx)
Context updateDefinition (const NamedDecl *D, Expr *Exp, Context Ctx)
Context clearDefinition (const NamedDecl *D, Context Ctx)
Context removeDefinition (const NamedDecl *D, Context Ctx)
Context intersectContexts (Context C1, Context C2)
Context createReferenceContext (Context C)
void intersectBackEdge (Context C1, Context C2)

Friends

class VarMapBuilder

Detailed Description

Definition at line 292 of file ThreadSafety.cpp.


Member Typedef Documentation

Definition at line 294 of file ThreadSafety.cpp.


Constructor & Destructor Documentation

Definition at line 330 of file ThreadSafety.cpp.

References getEmptyContext().


Member Function Documentation

Context clang::threadSafety::LocalVariableMap::addDefinition ( const NamedDecl D,
const Expr Exp,
Context  Ctx 
) [inline, protected]

Definition at line 434 of file ThreadSafety.cpp.

Referenced by clang::threadSafety::VarMapBuilder::VisitDeclStmt().

Context clang::threadSafety::LocalVariableMap::addReference ( const NamedDecl D,
unsigned  i,
Context  Ctx 
) [inline, protected]

Definition at line 443 of file ThreadSafety.cpp.

Referenced by createReferenceContext().

Definition at line 573 of file ThreadSafety.cpp.

References addReference(), getEmptyContext(), and P.

Referenced by traverseCFG().

Dumps an ASCII representation of the variable map to llvm::errs()

Definition at line 392 of file ThreadSafety.cpp.

References clang::Stmt::dump(), and dumpVarDefinitionName().

Dumps an ASCII representation of a Context to llvm::errs()

Definition at line 408 of file ThreadSafety.cpp.

References dumpVarDefinitionName(), and clang::NamedDecl::printName().

Definition at line 377 of file ThreadSafety.cpp.

References clang::NamedDecl::printName().

Referenced by dump(), and dumpContext().

Definition at line 425 of file ThreadSafety.cpp.

Referenced by traverseCFG().

Return the next context after processing S. This function is used by clients of the class to get the appropriate context when traversing the CFG. It must be called for every assignment or DeclStmt.

Definition at line 368 of file ThreadSafety.cpp.

References AttributeLangSupport::C.

Referenced by clang::threadSafety::BuildLockset::VisitBinaryOperator(), and clang::threadSafety::BuildLockset::VisitDeclStmt().

Definition at line 557 of file ThreadSafety.cpp.

References clearDefinition(), P, and removeDefinition().

Referenced by traverseCFG().

Look up a definition, within the given context.

Definition at line 336 of file ThreadSafety.cpp.

const Expr* clang::threadSafety::LocalVariableMap::lookupExpr ( const NamedDecl D,
Context Ctx 
) [inline]

Look up the definition for D within the given context. Returns NULL if the expression is not statically known. If successful, also modifies Ctx to hold the context of the return Expr.

Definition at line 347 of file ThreadSafety.cpp.

References P.

Referenced by clang::threadSafety::ThreadSafetyAnalyzer::getTrylockCallExpr().

Definition at line 475 of file ThreadSafety.cpp.

Referenced by intersectContexts().

void clang::threadSafety::LocalVariableMap::saveContext ( Stmt S,
Context  C 
) [inline, protected]
void clang::threadSafety::LocalVariableMap::traverseCFG ( CFG CFGraph,
const PostOrderCFGView SortedGraph,
std::vector< CFGBlockInfo > &  BlockInfo 
)
Context clang::threadSafety::LocalVariableMap::updateDefinition ( const NamedDecl D,
Expr Exp,
Context  Ctx 
) [inline, protected]

Friends And Related Function Documentation

friend class VarMapBuilder [friend]

Definition at line 487 of file ThreadSafety.cpp.


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