15 #ifndef LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
16 #define LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/DenseSet.h"
20 #include "llvm/ADT/SmallVector.h"
46 llvm::DenseMap<const Stmt *, unsigned> ToScopes;
50 bool AlwaysBypassed =
false;
58 return AlwaysBypassed || Bypasses.find(D) != Bypasses.end();
62 bool BuildScopeInformation(
const Decl *D,
unsigned &ParentScope);
63 bool BuildScopeInformation(
const Stmt *
S,
unsigned &origParentScope);
65 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 ...
VarDecl - An instance of this class is created to represent a variable declaration or definition...
bool IsBypassed(const VarDecl *D) const
Returns true if the variable declaration was by bypassed by any goto or switch statement.
void Init(const Stmt *Body)
Clear the object and pre-process for the given statement, usually function body statement.