|
clang 24.0.0git
|
Scope chain managing the variable lifetimes. More...
Public Member Functions | |
| VariableScope (Compiler< Emitter > *Ctx, ScopeKind Kind=ScopeKind::Block) | |
| virtual | ~VariableScope () |
| virtual void | addLocal (Scope::Local Local) |
| void | addForScopeKind (const Scope::Local &Local, ScopeKind Kind) |
| Like addExtended, but adds to the nearest scope of the given kind. | |
| virtual bool | emitDestructors (const Expr *E=nullptr) |
| virtual bool | destroyLocals (const Expr *E=nullptr) |
| virtual void | forceInit () |
| VariableScope * | getParent () const |
| ScopeKind | getKind () const |
Public Attributes | |
| bool | LocalsAlwaysEnabled = true |
| Whether locals added to this scope are enabled by default. | |
Protected Attributes | |
| Compiler< Emitter > * | Ctx |
| Compiler instance. | |
| VariableScope * | Parent |
| Link to the parent scope. | |
| ScopeKind | Kind |
Scope chain managing the variable lifetimes.
Definition at line 54 of file Compiler.cpp.
|
inline |
Definition at line 56 of file Compiler.cpp.
References clang::interp::Block, Ctx, Kind, LocalsAlwaysEnabled, and Parent.
Referenced by addForScopeKind(), getParent(), and clang::interp::LocalScope< Emitter >::LocalScope().
|
inlinevirtual |
Definition at line 63 of file Compiler.cpp.
|
inline |
Like addExtended, but adds to the nearest scope of the given kind.
Definition at line 69 of file Compiler.cpp.
References addLocal(), clang::interp::Block, Kind, Parent, and VariableScope().
|
inlinevirtual |
Reimplemented in clang::interp::LocalScope< Emitter >.
Definition at line 65 of file Compiler.cpp.
Referenced by addForScopeKind(), and clang::interp::Compiler< Emitter >::allocateTemporary().
|
inlinevirtual |
Reimplemented in clang::interp::LocalScope< Emitter >.
Definition at line 93 of file Compiler.cpp.
|
inlinevirtual |
Reimplemented in clang::interp::LocalScope< Emitter >.
Definition at line 92 of file Compiler.cpp.
|
inlinevirtual |
Reimplemented in clang::interp::LocalScope< Emitter >.
Definition at line 94 of file Compiler.cpp.
|
inline |
Definition at line 96 of file Compiler.cpp.
References Kind.
|
inline |
Definition at line 95 of file Compiler.cpp.
References Parent, and VariableScope().
Referenced by clang::interp::Compiler< Emitter >::allocateTemporary().
|
protected |
Compiler instance.
Definition at line 105 of file Compiler.cpp.
Referenced by clang::interp::LocalScope< Emitter >::addLocal(), clang::interp::DeclScope< Emitter >::DeclScope(), clang::interp::LocalScope< Emitter >::destroyLocals(), clang::interp::LocalScope< Emitter >::emitDestructors(), clang::interp::LocalScope< Emitter >::forceInit(), clang::interp::LocalScope< Emitter >::LocalScope(), clang::interp::LocalScope< Emitter >::removeIfStoredOpaqueValue(), clang::interp::LocalScope< Emitter >::removeStoredOpaqueValues(), VariableScope(), clang::interp::DeclScope< Emitter >::~DeclScope(), clang::interp::LocalScope< Emitter >::~LocalScope(), and ~VariableScope().
|
protected |
Definition at line 108 of file Compiler.cpp.
Referenced by addForScopeKind(), getKind(), clang::interp::LocalScope< Emitter >::LocalScope(), and VariableScope().
| bool clang::interp::VariableScope< Emitter >::LocalsAlwaysEnabled = true |
Whether locals added to this scope are enabled by default.
This is almost always true, except for the two branches of a conditional operator.
Definition at line 101 of file Compiler.cpp.
Referenced by clang::interp::LocalScope< Emitter >::addLocal(), and VariableScope().
|
protected |
Link to the parent scope.
Definition at line 107 of file Compiler.cpp.
Referenced by addForScopeKind(), getParent(), VariableScope(), and ~VariableScope().