clang  19.0.0git
Public Member Functions | Public Attributes | List of all members
clang::interp::LocalScope< Emitter > Class Template Reference

Generic scope for local variables. More...

#include "/home/runner/work/llvm/llvm/repo/clang/lib/AST/Interp/ByteCodeExprGen.h"

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

Public Member Functions

 LocalScope (ByteCodeExprGen< Emitter > *Ctx)
 
 ~LocalScope () override
 Emit a Destroy op for this scope. More...
 
void emitDestruction () override
 Overriden to support explicit destruction. More...
 
bool destroyLocals ()
 Explicit destruction of local variables. More...
 
void addLocal (const Scope::Local &Local) override
 
bool emitDestructors () override
 
void removeStoredOpaqueValues ()
 
void removeIfStoredOpaqueValue (const Scope::Local &Local)
 
- Public Member Functions inherited from clang::interp::VariableScope< Emitter >
 VariableScope (ByteCodeExprGen< Emitter > *Ctx, const ValueDecl *VD)
 
virtual ~VariableScope ()
 
void add (const Scope::Local &Local, bool IsExtended)
 
virtual void addExtended (const Scope::Local &Local)
 
void addExtended (const Scope::Local &Local, const ValueDecl *ExtendingDecl)
 
VariableScopegetParent () const
 

Public Attributes

std::optional< unsignedIdx
 Index of the scope in the chain. More...
 

Additional Inherited Members

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

Detailed Description

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

Generic scope for local variables.

Definition at line 387 of file ByteCodeExprGen.h.

Constructor & Destructor Documentation

◆ LocalScope()

template<class Emitter >
clang::interp::LocalScope< Emitter >::LocalScope ( ByteCodeExprGen< Emitter > *  Ctx)
inline

Definition at line 389 of file ByteCodeExprGen.h.

◆ ~LocalScope()

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

Emit a Destroy op for this scope.

Definition at line 393 of file ByteCodeExprGen.h.

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 415 of file ByteCodeExprGen.h.

◆ destroyLocals()

template<class Emitter >
bool clang::interp::LocalScope< Emitter >::destroyLocals ( )
inline

Explicit destruction of local variables.

Definition at line 404 of file ByteCodeExprGen.h.

Referenced by clang::interp::ByteCodeExprGen< Emitter >::visitExpr(), and clang::interp::ByteCodeExprGen< Emitter >::VisitExprWithCleanups().

◆ 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 401 of file ByteCodeExprGen.h.

◆ emitDestructors()

template<class Emitter >
bool clang::interp::LocalScope< Emitter >::emitDestructors ( )
inlineoverridevirtual

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

Definition at line 424 of file ByteCodeExprGen.h.

◆ removeIfStoredOpaqueValue()

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

Definition at line 454 of file ByteCodeExprGen.h.

◆ removeStoredOpaqueValues()

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

Definition at line 445 of file ByteCodeExprGen.h.

Member Data Documentation

◆ Idx

template<class Emitter >
std::optional<unsigned> clang::interp::LocalScope< Emitter >::Idx

Index of the scope in the chain.

Definition at line 464 of file ByteCodeExprGen.h.


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