clang 22.0.0git
clang::interp::LocalScope< Emitter > Class Template Reference

Generic scope for local variables. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Compiler.h"

Inheritance diagram for clang::interp::LocalScope< Emitter >:
[legend]

Public Member Functions

 LocalScope (Compiler< Emitter > *Ctx, ScopeKind Kind=ScopeKind::Block)
 LocalScope (Compiler< Emitter > *Ctx, const ValueDecl *VD)
 ~LocalScope () override
 Emit a Destroy op for this scope.
void emitDestruction () override
 Overriden to support explicit destruction.
bool destroyLocals (const Expr *E=nullptr) override
 Explicit destruction of local variables.
void addLocal (const Scope::Local &Local) override
bool emitDestructors (const Expr *E=nullptr) override
void removeStoredOpaqueValues ()
void removeIfStoredOpaqueValue (const Scope::Local &Local)
Public Member Functions inherited from clang::interp::VariableScope< Emitter >
 VariableScope (Compiler< Emitter > *Ctx, const ValueDecl *VD, ScopeKind Kind=ScopeKind::Block)
virtual ~VariableScope ()
void addExtended (const Scope::Local &Local, const ValueDecl *ExtendingDecl)
void addForScopeKind (const Scope::Local &Local, ScopeKind Kind)
 Like addExtended, but adds to the nearest scope of the given kind.
VariableScopegetParent () const
ScopeKind getKind () const

Public Attributes

UnsignedOrNone Idx = std::nullopt
 Index of the scope in the chain.

Additional Inherited Members

Protected Attributes inherited from clang::interp::VariableScope< Emitter >
Compiler< Emitter > * Ctx
 Compiler instance.
VariableScopeParent
 Link to the parent scope.
const ValueDeclValDecl = nullptr
ScopeKind Kind

Detailed Description

template<class Emitter>
class clang::interp::LocalScope< Emitter >

Generic scope for local variables.

Definition at line 540 of file Compiler.h.

Constructor & Destructor Documentation

◆ LocalScope() [1/2]

◆ LocalScope() [2/2]

template<class Emitter>
clang::interp::LocalScope< Emitter >::LocalScope ( Compiler< Emitter > * Ctx,
const ValueDecl * VD )
inline

◆ ~LocalScope()

template<class Emitter>
clang::interp::LocalScope< Emitter >::~LocalScope ( )
inlineoverride

Emit a Destroy op for this scope.

Definition at line 548 of file Compiler.h.

References Idx, and removeStoredOpaqueValues().

Member Function Documentation

◆ addLocal()

template<class Emitter>
void clang::interp::LocalScope< Emitter >::addLocal ( const Scope::Local & Local)
inlineoverridevirtual

Reimplemented from clang::interp::VariableScope< Emitter >.

Definition at line 576 of file Compiler.h.

References Idx.

◆ destroyLocals()

◆ emitDestruction()

template<class Emitter>
void clang::interp::LocalScope< Emitter >::emitDestruction ( )
inlineoverridevirtual

Overriden to support explicit destruction.

Reimplemented from clang::interp::VariableScope< Emitter >.

Definition at line 556 of file Compiler.h.

References emitDestructors(), and Idx.

◆ emitDestructors()

template<class Emitter>
bool clang::interp::LocalScope< Emitter >::emitDestructors ( const Expr * E = nullptr)
inlineoverridevirtual

Reimplemented from clang::interp::VariableScope< Emitter >.

Definition at line 586 of file Compiler.h.

References Idx, and removeIfStoredOpaqueValue().

Referenced by destroyLocals(), and emitDestruction().

◆ removeIfStoredOpaqueValue()

template<class Emitter>
void clang::interp::LocalScope< Emitter >::removeIfStoredOpaqueValue ( const Scope::Local & Local)
inline

Definition at line 614 of file Compiler.h.

Referenced by emitDestructors(), and removeStoredOpaqueValues().

◆ removeStoredOpaqueValues()

template<class Emitter>
void clang::interp::LocalScope< Emitter >::removeStoredOpaqueValues ( )
inline

Definition at line 605 of file Compiler.h.

References Idx, and removeIfStoredOpaqueValue().

Referenced by ~LocalScope().

Member Data Documentation

◆ Idx

template<class Emitter>
UnsignedOrNone clang::interp::LocalScope< Emitter >::Idx = std::nullopt

Index of the scope in the chain.

Definition at line 624 of file Compiler.h.

Referenced by addLocal(), destroyLocals(), emitDestruction(), emitDestructors(), removeStoredOpaqueValues(), and ~LocalScope().


The documentation for this class was generated from the following file: