15 #ifndef LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H 16 #define LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H 19 #include "llvm/ADT/DenseMap.h" 20 #include "llvm/ADT/DenseSet.h" 21 #include "llvm/ADT/SmallVector.h" 47 llvm::DenseMap<const Stmt *, unsigned> ToScopes;
51 bool AlwaysBypassed =
false;
59 return AlwaysBypassed || Bypasses.find(D) != Bypasses.end();
63 bool BuildScopeInformation(
const Decl *D,
unsigned &ParentScope);
64 bool BuildScopeInformation(
const Stmt *S,
unsigned &origParentScope);
66 void Detect(
unsigned From,
unsigned To);
The class detects jumps which bypass local variables declaration: goto L; int a; L: ...
Stmt - This represents one statement.
Decl - This represents one declaration (or definition), e.g.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
Represents a variable declaration or definition.
Dataflow Directional Tag Classes.
void Init(const Stmt *Body)
Clear the object and pre-process for the given statement, usually function body statement.
bool IsBypassed(const VarDecl *D) const
Returns true if the variable declaration was by bypassed by any goto or switch statement.