14#ifndef LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
15#define LLVM_CLANG_LIB_CODEGEN_VARBYPASSDETECTOR_H
19#include "llvm/ADT/DenseMap.h"
20#include "llvm/ADT/DenseSet.h"
21#include "llvm/ADT/SetVector.h"
22#include "llvm/ADT/SmallVector.h"
48 llvm::DenseMap<const Stmt *, unsigned> ToScopes;
50 llvm::DenseSet<const VarDecl *> Bypasses;
53 llvm::DenseMap<const Stmt *, llvm::SmallSetVector<const VarDecl *, 4>>
56 bool AlwaysBypassed =
false;
64 return AlwaysBypassed || Bypasses.contains(D);
75 auto It = BypassedVarsAtSource.find(Source);
76 if (It == BypassedVarsAtSource.end())
83 unsigned &ParentScope);
85 unsigned &origParentScope);
87 void Detect(
unsigned From,
unsigned To,
const Stmt *Source);
This class organizes the cross-function state that is used while generating LLVM code.
The class detects jumps which bypass local variables declaration: goto L; int a; L:
bool IsBypassed(const VarDecl *D) const
Returns true if the variable declaration was by bypassed by any goto or switch statement.
const llvm::SmallSetVector< const VarDecl *, 4 > * getBypassedVarsForSource(const Stmt *Source) const
Returns the variables bypassed by jumps from the given source statement, or nullptr if it bypasses no...
bool isAlwaysBypassed() const
Returns true if jump sources cannot be determined (e.g.
Decl - This represents one declaration (or definition), e.g.
Stmt - This represents one statement.
Represents a variable declaration or definition.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
Top level wrappers for InstallAPI frontend operations.