13#ifndef LLVM_CLANG_AST_INTERP_BYTECODESTMTGEN_H
14#define LLVM_CLANG_AST_INTERP_BYTECODESTMTGEN_H
25template <
class Emitter>
class LoopScope;
26template <
class Emitter>
class SwitchScope;
27template <
class Emitter>
class LabelScope;
30template <
class Emitter>
32 using LabelTy =
typename Emitter::LabelTy;
33 using AddrTy =
typename Emitter::AddrTy;
34 using OptLabelTy = std::optional<LabelTy>;
35 using CaseMap = llvm::DenseMap<const SwitchCase *, LabelTy>;
38 template<
typename... Tys>
51 bool visitStmt(
const Stmt *S);
53 bool visitLoopBody(
const Stmt *S);
54 bool visitDeclStmt(
const DeclStmt *DS);
56 bool visitIfStmt(
const IfStmt *IS);
58 bool visitDoStmt(
const DoStmt *S);
59 bool visitForStmt(
const ForStmt *S);
64 bool visitCaseStmt(
const CaseStmt *S);
72 std::optional<PrimType> ReturnType;
78 OptLabelTy BreakLabel;
80 OptLabelTy ContinueLabel;
82 OptLabelTy DefaultLabel;
Represents an attribute applied to a statement.
BreakStmt - This represents a break.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Represents a static or instance method of a struct/union/class.
CXXTryStmt - A C++ try block, including all handlers.
CaseStmt - Represent a case statement.
CompoundStmt - This represents a group of statements like { stmt stmt }.
ContinueStmt - This represents a continue.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
DoStmt - This represents a 'do/while' stmt.
ForStmt - This represents a 'for (init;cond;inc)' stmt.
Represents a function declaration or definition.
IfStmt - This represents an if/then/else.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Stmt - This represents one statement.
SwitchStmt - This represents a 'switch' stmt.
WhileStmt - This represents a 'while' stmt.
Compilation context for expressions.
Compilation context for statements.
bool visitFunc(const FunctionDecl *F) override
ByteCodeStmtGen(Tys &&... Args)
Scope managing label targets.
Sets the context for break/continue statements.
The JSON file list parser is used to communicate input to InstallAPI.