13 #ifndef LLVM_CLANG_AST_INTERP_BLOCK_H 14 #define LLVM_CLANG_AST_INTERP_BLOCK_H 21 #include "llvm/ADT/PointerUnion.h" 22 #include "llvm/Support/raw_ostream.h" 64 char *
data() {
return reinterpret_cast<char *
>(
this + 1); }
68 T &
deref() {
return *
reinterpret_cast<T *
>(
data()); }
84 : IsStatic(IsStatic), IsExtern(IsExtern), IsDead(
true), Desc(Desc) {}
118 char *
data() {
return B.data(); }
Descriptor for a dead block.
bool hasPointers() const
Checks if the block has any live pointers.
constexpr XRayInstrMask Function
Descriptor * getDescriptor() const
Returns the block's descriptor.
Descriptor * Desc
Pointer to the stack slot descriptor.
A pointer to a memory block, live or dead.
Block(Descriptor *Desc, bool IsExtern, bool IsStatic, bool IsDead)
A memory block, either on the stack or in the heap.
void movePointer(Pointer *From, Pointer *To)
bool IsDead
Flag indicating if the pointer is dead.
PrimType
Enumeration of the primitive types of the VM.
const bool IsConst
Flag indicating if the block is mutable.
InterpSize getSize() const
Returns the size of the block.
Describes a memory block created by an allocation site.
__DEVICE__ void * memset(void *__a, int __b, size_t __c)
bool isExtern() const
Checks if the block is extern.
Pointer * Pointers
Start of the chain of pointers.
void removePointer(Pointer *P)
const bool IsTemporary
Flag indicating if the block is a temporary.
void invokeCtor()
Invokes the constructor.
bool isTemporary() const
Checks if the block is temporary.
const BlockCtorFn CtorFn
Storage management methods.
char * data()
Returns a pointer to the stored data.
unsigned getAllocSize() const
Returns the allocated size, including metadata.
llvm::Optional< unsigned > getDeclID() const
Returns the declaration ID.
Block(Descriptor *Desc, bool IsStatic=false, bool IsExtern=false)
bool isStatic() const
Checks if the block has static storage duration.
bool IsStatic
Flag indicating if the block has static storage duration.
bool IsExtern
Flag indicating if the block is an extern.
Dataflow Directional Tag Classes.
const bool IsMutable
Flag indicating if a field is mutable.
unsigned InterpSize
Object size as used by the interpreter.
T & deref()
Returns a view over the data.
char * data()
Returns a pointer to the stored data.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
Block(const llvm::Optional< unsigned > &DeclID, Descriptor *Desc, bool IsStatic=false, bool IsExtern=false)
llvm::Optional< unsigned > DeclID
Unique identifier of the declaration.
void addPointer(Pointer *P)