13#ifndef LLVM_CLANG_AST_INTERP_INTERPSTATE_H
14#define LLVM_CLANG_AST_INTERP_INTERPSTATE_H
52 return Parent.getBottomFrame();
57 return Parent.getEvalStatus();
63 return Parent.checkingForUndefinedBehavior();
66 return Parent.keepEvaluatingAfterFailure();
69 return Parent.checkingPotentialConstantExpression();
72 return Parent.noteUndefinedBehavior();
77 Parent.setActiveDiagnostic(Flag);
80 Parent.setFoldFailureDiagnostic(Flag);
Implements a partial diagnostic which may not be emitted.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
This represents one expression.
A memory block, either on the stack or in the heap.
Pointer into the code segment.
Holds all information required to evaluate constexpr code in a module.
Descriptor for a dead block.
Base class for stack frames, shared between VM and walker.
SourceInfo getSource(CodePtr PC) const
Returns the source information at a given PC.
Frame storing local variables.
unsigned getDepth() const
Stack frame storing temporaries and parameters.
const Frame * getBottomFrame() const override
unsigned getCallStackDepth() override
Expr::EvalStatus & getEvalStatus() const override
Context & getContext() const
bool keepEvaluatingAfterFailure() const override
bool reportOverflow(const Expr *E, const llvm::APSInt &Value)
Reports overflow and return true if evaluation should continue.
bool noteUndefinedBehavior() override
Context & Ctx
Interpreter Context.
SourceInfo getSource(const Function *F, CodePtr PC) const override
Delegates source mapping to the mapper.
Frame * getCurrentFrame() override
InterpState(const InterpState &)=delete
InterpStack & Stk
Temporary stack.
bool inConstantContext() const
InterpFrame * Current
The current frame.
bool hasActiveDiagnostic() override
void setActiveDiagnostic(bool Flag) override
bool checkingForUndefinedBehavior() const override
void setFoldFailureDiagnostic(bool Flag) override
InterpState & operator=(const InterpState &)=delete
void deallocate(Block *B)
Deallocates a pointer.
ASTContext & getCtx() const override
bool checkingPotentialConstantExpression() const override
bool hasPriorDiagnostic() override
Program & P
Reference to the module containing all bytecode.
The program contains and links the bytecode for all functions.
Describes the statement/declaration an opcode was generated from.
Interface for classes which map locations to sources.
virtual SourceInfo getSource(const Function *F, CodePtr PC) const =0
Returns source information for a given PC in a function.
Interface for the VM to interact with the AST walker's context.
EvalStatus is a struct with detailed info about an evaluation in progress.