clang
10.0.0git
|
A memory block, either on the stack or in the heap. More...
#include "/work/www-prereleases/10.0.0/rc2/docsbuild/clang/lib/AST/Interp/Block.h"
Public Member Functions | |
Block (const llvm::Optional< unsigned > &DeclID, Descriptor *Desc, bool IsStatic=false, bool IsExtern=false) | |
Block (Descriptor *Desc, bool IsStatic=false, bool IsExtern=false) | |
Descriptor * | getDescriptor () const |
Returns the block's descriptor. More... | |
bool | hasPointers () const |
Checks if the block has any live pointers. More... | |
bool | isExtern () const |
Checks if the block is extern. More... | |
bool | isStatic () const |
Checks if the block has static storage duration. More... | |
bool | isTemporary () const |
Checks if the block is temporary. More... | |
InterpSize | getSize () const |
Returns the size of the block. More... | |
llvm::Optional< unsigned > | getDeclID () const |
Returns the declaration ID. More... | |
char * | data () |
Returns a pointer to the stored data. More... | |
template<typename T > | |
T & | deref () |
Returns a view over the data. More... | |
void | invokeCtor () |
Invokes the constructor. More... | |
Protected Member Functions | |
Block (Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead) | |
void | cleanup () |
void | addPointer (Pointer *P) |
void | removePointer (Pointer *P) |
void | movePointer (Pointer *From, Pointer *To) |
Protected Attributes | |
Pointer * | Pointers = nullptr |
Start of the chain of pointers. More... | |
llvm::Optional< unsigned > | DeclID |
Unique identifier of the declaration. More... | |
bool | IsStatic = false |
Flag indicating if the block has static storage duration. More... | |
bool | IsExtern = false |
Flag indicating if the block is an extern. More... | |
bool | IsDead = false |
Flag indicating if the pointer is dead. More... | |
Descriptor * | Desc |
Pointer to the stack slot descriptor. More... | |
Friends | |
class | Pointer |
class | DeadBlock |
class | InterpState |
A memory block, either on the stack or in the heap.
The storage described by the block immediately follows it in memory.
|
inline |
|
inline |
|
inlineprotected |
Definition at line 83 of file Block.h.
References addPointer(), cleanup(), movePointer(), P, and removePointer().
|
protected |
Definition at line 21 of file Block.cpp.
References IsStatic, P, and Pointers.
Referenced by Block(), clang::interp::Pointer::operator=(), and clang::interp::Pointer::Pointer().
|
protected |
Definition at line 42 of file Block.cpp.
References IsDead, and Pointers.
Referenced by Block(), clang::interp::Pointer::operator=(), and clang::interp::Pointer::~Pointer().
|
inline |
Returns a pointer to the stored data.
Definition at line 64 of file Block.h.
Referenced by clang::interp::InterpState::deallocate(), deref(), clang::interp::Pointer::deref(), clang::interp::Pointer::elem(), and invokeCtor().
|
inline |
Returns a view over the data.
Definition at line 68 of file Block.h.
References data().
Referenced by clang::interp::InitGlobal().
|
inline |
Returns the declaration ID.
Definition at line 61 of file Block.h.
References DeclID.
Referenced by clang::interp::Pointer::getDeclID().
|
inline |
Returns the block's descriptor.
Definition at line 49 of file Block.h.
References Desc.
Referenced by clang::interp::InterpState::deallocate().
|
inline |
Returns the size of the block.
Definition at line 59 of file Block.h.
References Desc, and clang::interp::Descriptor::getAllocSize().
Referenced by clang::interp::InterpState::deallocate(), invokeCtor(), and clang::interp::Pointer::print().
|
inline |
Checks if the block has any live pointers.
Definition at line 51 of file Block.h.
References Pointers.
Referenced by clang::interp::InterpState::deallocate().
|
inline |
Invokes the constructor.
Definition at line 71 of file Block.h.
References clang::interp::Descriptor::CtorFn, data(), Desc, getSize(), clang::interp::Descriptor::IsConst, clang::interp::Descriptor::IsMutable, and memset().
Referenced by clang::interp::EvalEmitter::createLocal().
|
inline |
Checks if the block is extern.
Definition at line 53 of file Block.h.
References IsExtern.
Referenced by clang::interp::Pointer::isExtern().
|
inline |
Checks if the block has static storage duration.
Definition at line 55 of file Block.h.
References IsStatic.
Referenced by ctorRecord(), and clang::interp::Pointer::isStatic().
|
inline |
Checks if the block is temporary.
Definition at line 57 of file Block.h.
References Desc, and clang::interp::Descriptor::IsTemporary.
Referenced by clang::interp::Pointer::isTemporary().
Definition at line 47 of file Block.cpp.
References IsStatic, and Pointers.
Referenced by Block(), clang::interp::Pointer::operator=(), and clang::interp::Pointer::Pointer().
|
protected |
Definition at line 31 of file Block.cpp.
References IsStatic, and Pointers.
Referenced by Block(), clang::interp::Pointer::operator=(), and clang::interp::Pointer::~Pointer().
|
friend |
|
protected |
Unique identifier of the declaration.
Definition at line 97 of file Block.h.
Referenced by getDeclID().
|
protected |
Pointer to the stack slot descriptor.
Definition at line 105 of file Block.h.
Referenced by ctorRecord(), clang::interp::Pointer::getDeclDesc(), getDescriptor(), getSize(), invokeCtor(), and isTemporary().
Flag indicating if the pointer is dead.
Definition at line 103 of file Block.h.
Referenced by cleanup(), and clang::interp::Pointer::isLive().
Flag indicating if the block is an extern.
Definition at line 101 of file Block.h.
Referenced by isExtern().
Flag indicating if the block has static storage duration.
Definition at line 99 of file Block.h.
Referenced by addPointer(), clang::interp::Pointer::initialize(), clang::interp::Pointer::isInitialized(), isStatic(), movePointer(), and removePointer().
|
protected |
Start of the chain of pointers.
Definition at line 95 of file Block.h.
Referenced by addPointer(), cleanup(), clang::interp::DeadBlock::DeadBlock(), hasPointers(), movePointer(), and removePointer().