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/SmallVector.h"
47 llvm::DenseMap<const Stmt *, unsigned> ToScopes;
49 llvm::DenseSet<const VarDecl *> Bypasses;
51 bool AlwaysBypassed =
false;
59 return AlwaysBypassed || Bypasses.contains(
D);
64 unsigned &ParentScope);
66 unsigned &origParentScope);
68 void Detect(
unsigned From,
unsigned To);
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.
Decl - This represents one declaration (or definition), e.g.
Stmt - This represents one statement.
Represents a variable declaration or definition.
std::variant< struct RequiresDecl, struct HeaderDecl, struct UmbrellaDirDecl, struct ModuleDecl, struct ExcludeDecl, struct ExportDecl, struct ExportAsDecl, struct ExternModuleDecl, struct UseDecl, struct LinkDecl, struct ConfigMacrosDecl, struct ConflictDecl > Decl
All declarations that can appear in a module declaration.
The JSON file list parser is used to communicate input to InstallAPI.