clang 22.0.0git
Descriptor.cpp
Go to the documentation of this file.
1//===--- Descriptor.cpp - Types for the constexpr VM ------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "Descriptor.h"
10#include "Boolean.h"
11#include "FixedPoint.h"
12#include "Floating.h"
13#include "IntegralAP.h"
14#include "MemberPointer.h"
15#include "Pointer.h"
16#include "PrimType.h"
17#include "Record.h"
18#include "Source.h"
19#include "clang/AST/ExprCXX.h"
20
21using namespace clang;
22using namespace clang::interp;
23
24template <typename T> static constexpr bool needsCtor() {
25 if constexpr (std::is_same_v<T, Integral<8, true>> ||
26 std::is_same_v<T, Integral<8, false>> ||
27 std::is_same_v<T, Integral<16, true>> ||
28 std::is_same_v<T, Integral<16, false>> ||
29 std::is_same_v<T, Integral<32, true>> ||
30 std::is_same_v<T, Integral<32, false>> ||
31 std::is_same_v<T, Integral<64, true>> ||
32 std::is_same_v<T, Integral<64, false>> ||
33 std::is_same_v<T, Boolean>)
34 return false;
35
36 return true;
37}
38
39template <typename T>
40static void ctorTy(Block *, std::byte *Ptr, bool, bool, bool, bool, bool,
41 const Descriptor *) {
42 static_assert(needsCtor<T>());
43 new (Ptr) T();
44}
45
46template <typename T>
47static void dtorTy(Block *, std::byte *Ptr, const Descriptor *) {
48 static_assert(needsCtor<T>());
49 reinterpret_cast<T *>(Ptr)->~T();
50}
51
52template <typename T>
53static void ctorArrayTy(Block *, std::byte *Ptr, bool, bool, bool, bool, bool,
54 const Descriptor *D) {
55 new (Ptr) InitMapPtr();
56
57 if constexpr (needsCtor<T>()) {
58 Ptr += sizeof(InitMapPtr);
59 for (unsigned I = 0, NE = D->getNumElems(); I < NE; ++I) {
60 new (&reinterpret_cast<T *>(Ptr)[I]) T();
61 }
62 }
63}
64
65template <typename T>
66static void dtorArrayTy(Block *, std::byte *Ptr, const Descriptor *D) {
67 InitMapPtr &IMP = *reinterpret_cast<InitMapPtr *>(Ptr);
68 IMP.deleteInitMap();
69
70 if constexpr (needsCtor<T>()) {
71 Ptr += sizeof(InitMapPtr);
72 for (unsigned I = 0, NE = D->getNumElems(); I < NE; ++I) {
73 reinterpret_cast<T *>(Ptr)[I].~T();
74 }
75 }
76}
77
78static void ctorArrayDesc(Block *B, std::byte *Ptr, bool IsConst,
79 bool IsMutable, bool IsVolatile, bool IsActive,
80 bool InUnion, const Descriptor *D) {
81 const unsigned NumElems = D->getNumElems();
82 const unsigned ElemSize =
84
85 unsigned ElemOffset = 0;
86 for (unsigned I = 0; I < NumElems; ++I, ElemOffset += ElemSize) {
87 auto *ElemPtr = Ptr + ElemOffset;
88 auto *Desc = reinterpret_cast<InlineDescriptor *>(ElemPtr);
89 auto *ElemLoc = reinterpret_cast<std::byte *>(Desc + 1);
90 auto *SD = D->ElemDesc;
91
92 Desc->Offset = ElemOffset + sizeof(InlineDescriptor);
93 Desc->Desc = SD;
94 Desc->IsInitialized = true;
95 Desc->IsBase = false;
96 Desc->IsActive = IsActive;
97 Desc->IsConst = IsConst || D->IsConst;
98 Desc->IsFieldMutable = IsMutable || D->IsMutable;
99 Desc->InUnion = InUnion;
100 Desc->IsArrayElement = true;
101 Desc->IsVolatile = IsVolatile;
102
103 if (auto Fn = D->ElemDesc->CtorFn)
104 Fn(B, ElemLoc, Desc->IsConst, Desc->IsFieldMutable, IsVolatile, IsActive,
105 Desc->InUnion || SD->isUnion(), D->ElemDesc);
106 }
107}
108
109static void dtorArrayDesc(Block *B, std::byte *Ptr, const Descriptor *D) {
110 const unsigned NumElems = D->getNumElems();
111 const unsigned ElemSize =
112 D->ElemDesc->getAllocSize() + sizeof(InlineDescriptor);
113
114 unsigned ElemOffset = 0;
115 auto Dtor = D->ElemDesc->DtorFn;
116 assert(Dtor &&
117 "a composite array without an elem dtor shouldn't have a dtor itself");
118 for (unsigned I = 0; I != NumElems; ++I, ElemOffset += ElemSize) {
119 auto *ElemPtr = Ptr + ElemOffset;
120 auto *Desc = reinterpret_cast<InlineDescriptor *>(ElemPtr);
121 auto *ElemLoc = reinterpret_cast<std::byte *>(Desc + 1);
122 Dtor(B, ElemLoc, D->ElemDesc);
123 }
124}
125
126static void initField(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable,
127 bool IsVolatile, bool IsActive, bool IsUnionField,
128 bool InUnion, const Descriptor *D, unsigned FieldOffset) {
129 auto *Desc = reinterpret_cast<InlineDescriptor *>(Ptr + FieldOffset) - 1;
130 Desc->Offset = FieldOffset;
131 Desc->Desc = D;
132 Desc->IsInitialized = D->IsArray;
133 Desc->IsBase = false;
134 Desc->IsActive = IsActive && !IsUnionField;
135 Desc->InUnion = InUnion;
136 Desc->IsConst = IsConst || D->IsConst;
137 Desc->IsFieldMutable = IsMutable || D->IsMutable;
138 Desc->IsVolatile = IsVolatile || D->IsVolatile;
139 // True if this field is const AND the parent is mutable.
140 Desc->IsConstInMutable = Desc->IsConst && IsMutable;
141
142 if (auto Fn = D->CtorFn)
143 Fn(B, Ptr + FieldOffset, Desc->IsConst, Desc->IsFieldMutable,
144 Desc->IsVolatile, Desc->IsActive, InUnion || D->isUnion(), D);
145}
146
147static void initBase(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable,
148 bool IsVolatile, bool IsActive, bool InUnion,
149 const Descriptor *D, unsigned FieldOffset,
150 bool IsVirtualBase) {
151 assert(D);
152 assert(D->ElemRecord);
153 assert(!D->ElemRecord->isUnion()); // Unions cannot be base classes.
154
155 auto *Desc = reinterpret_cast<InlineDescriptor *>(Ptr + FieldOffset) - 1;
156 Desc->Offset = FieldOffset;
157 Desc->Desc = D;
158 Desc->IsInitialized = D->IsArray;
159 Desc->IsBase = true;
160 Desc->IsVirtualBase = IsVirtualBase;
161 Desc->IsActive = IsActive && !InUnion;
162 Desc->IsConst = IsConst || D->IsConst;
163 Desc->IsFieldMutable = IsMutable || D->IsMutable;
164 Desc->InUnion = InUnion;
165 Desc->IsVolatile = false;
166
167 for (const auto &V : D->ElemRecord->bases())
168 initBase(B, Ptr + FieldOffset, IsConst, IsMutable, IsVolatile, IsActive,
169 InUnion, V.Desc, V.Offset, false);
170 for (const auto &F : D->ElemRecord->fields())
171 initField(B, Ptr + FieldOffset, IsConst, IsMutable, IsVolatile, IsActive,
172 InUnion, InUnion, F.Desc, F.Offset);
173}
174
175static void ctorRecord(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable,
176 bool IsVolatile, bool IsActive, bool InUnion,
177 const Descriptor *D) {
178 for (const auto &V : D->ElemRecord->bases())
179 initBase(B, Ptr, IsConst, IsMutable, IsVolatile, IsActive, InUnion, V.Desc,
180 V.Offset,
181 /*IsVirtualBase=*/false);
182 for (const auto &F : D->ElemRecord->fields()) {
183 bool IsUnionField = D->isUnion();
184 initField(B, Ptr, IsConst, IsMutable, IsVolatile, IsActive, IsUnionField,
185 InUnion || IsUnionField, F.Desc, F.Offset);
186 }
187 for (const auto &V : D->ElemRecord->virtual_bases())
188 initBase(B, Ptr, IsConst, IsMutable, IsVolatile, IsActive, InUnion, V.Desc,
189 V.Offset,
190 /*IsVirtualBase=*/true);
191}
192
193static void destroyField(Block *B, std::byte *Ptr, const Descriptor *D,
194 unsigned FieldOffset) {
195 if (auto Fn = D->DtorFn)
196 Fn(B, Ptr + FieldOffset, D);
197}
198
199static void destroyBase(Block *B, std::byte *Ptr, const Descriptor *D,
200 unsigned FieldOffset) {
201 assert(D);
202 assert(D->ElemRecord);
203
204 for (const auto &V : D->ElemRecord->bases())
205 destroyBase(B, Ptr + FieldOffset, V.Desc, V.Offset);
206 for (const auto &F : D->ElemRecord->fields())
207 destroyField(B, Ptr + FieldOffset, F.Desc, F.Offset);
208}
209
210static void dtorRecord(Block *B, std::byte *Ptr, const Descriptor *D) {
211 for (const auto &F : D->ElemRecord->bases())
212 destroyBase(B, Ptr, F.Desc, F.Offset);
213 for (const auto &F : D->ElemRecord->fields())
214 destroyField(B, Ptr, F.Desc, F.Offset);
215 for (const auto &F : D->ElemRecord->virtual_bases())
216 destroyBase(B, Ptr, F.Desc, F.Offset);
217}
218
219/// Whether a record needs its descriptor dtor function called.
220static bool needsRecordDtor(const Record *R) {
221 for (const auto &B : R->bases()) {
222 if (B.Desc->DtorFn)
223 return true;
224 }
225
226 for (const auto &F : R->fields()) {
227 if (F.Desc->DtorFn)
228 return true;
229 }
230
231 for (const auto &V : R->virtual_bases()) {
232 if (V.Desc->DtorFn)
233 return true;
234 }
235 return false;
236}
237
239 switch (T) {
240 case PT_Float:
242 case PT_IntAP:
244 case PT_IntAPS:
246 case PT_Ptr:
248 case PT_MemberPtr:
250 default:
251 return nullptr;
252 }
253 llvm_unreachable("Unhandled PrimType");
254}
255
257 switch (T) {
258 case PT_Float:
260 case PT_IntAP:
262 case PT_IntAPS:
264 case PT_Ptr:
266 case PT_MemberPtr:
268 default:
269 return nullptr;
270 }
271 llvm_unreachable("Unhandled PrimType");
272}
273
276 llvm_unreachable("unknown Expr");
277}
278
281 llvm_unreachable("unknown Expr");
282}
283
284/// Primitives.
285Descriptor::Descriptor(const DeclTy &D, const Type *SourceTy, PrimType Type,
286 MetadataSize MD, bool IsConst, bool IsTemporary,
287 bool IsMutable, bool IsVolatile)
288 : Source(D), SourceType(SourceTy), ElemSize(primSize(Type)), Size(ElemSize),
289 MDSize(MD.value_or(0)), AllocSize(align(Size + MDSize)), PrimT(Type),
293 assert(AllocSize >= Size);
294 assert(Source && "Missing source");
295}
296
297/// Primitive arrays.
299 size_t NumElems, bool IsConst, bool IsTemporary,
300 bool IsMutable)
301 : Source(D), ElemSize(primSize(Type)), Size(ElemSize * NumElems),
302 MDSize(MD.value_or(0)),
303 AllocSize(align(MDSize) + align(Size) + sizeof(InitMapPtr)), PrimT(Type),
307 assert(Source && "Missing source");
308 assert(NumElems <= (MaxArrayElemBytes / ElemSize));
309}
310
311/// Primitive unknown-size arrays.
313 bool IsTemporary, bool IsConst, UnknownSize)
314 : Source(D), ElemSize(primSize(Type)), Size(UnknownSizeMark),
315 MDSize(MD.value_or(0)),
316 AllocSize(MDSize + sizeof(InitMapPtr) + alignof(void *)), PrimT(Type),
320 assert(Source && "Missing source");
321}
322
323/// Arrays of composite elements.
324Descriptor::Descriptor(const DeclTy &D, const Type *SourceTy,
325 const Descriptor *Elem, MetadataSize MD,
326 unsigned NumElems, bool IsConst, bool IsTemporary,
327 bool IsMutable)
328 : Source(D), SourceType(SourceTy),
329 ElemSize(Elem->getAllocSize() + sizeof(InlineDescriptor)),
330 Size(ElemSize * NumElems), MDSize(MD.value_or(0)),
331 AllocSize(std::max<size_t>(alignof(void *), Size) + MDSize),
335 assert(Source && "Missing source");
336}
337
338/// Unknown-size arrays of composite elements.
341 : Source(D), ElemSize(Elem->getAllocSize() + sizeof(InlineDescriptor)),
342 Size(UnknownSizeMark), MDSize(MD.value_or(0)),
343 AllocSize(MDSize + alignof(void *)), ElemDesc(Elem), IsConst(true),
346 assert(Source && "Missing source");
347}
348
349/// Composite records.
351 bool IsConst, bool IsTemporary, bool IsMutable,
352 bool IsVolatile)
353 : Source(D), ElemSize(std::max<size_t>(alignof(void *), R->getFullSize())),
354 Size(ElemSize), MDSize(MD.value_or(0)), AllocSize(Size + MDSize),
358 assert(Source && "Missing source");
359}
360
361/// Dummy.
363 : Source(D), ElemSize(1), Size(1), MDSize(MD.value_or(0)),
364 AllocSize(MDSize), ElemRecord(nullptr), IsConst(true), IsMutable(false),
366 assert(Source && "Missing source");
367}
368
370 if (SourceType)
371 return QualType(SourceType, 0);
372 if (const auto *D = asValueDecl())
373 return D->getType();
374 if (const auto *T = dyn_cast_if_present<TypeDecl>(asDecl()))
375 return T->getASTContext().getTypeDeclType(T);
376
377 // The Source sometimes has a different type than the once
378 // we really save. Try to consult the Record first.
379 if (isRecord()) {
380 const RecordDecl *RD = ElemRecord->getDecl();
381 return RD->getASTContext().getCanonicalTagType(RD);
382 }
383 if (const auto *E = asExpr())
384 return E->getType();
385 llvm_unreachable("Invalid descriptor type");
386}
387
389 assert(isArray());
390 QualType T = getType();
391 if (T->isPointerOrReferenceType())
392 T = T->getPointeeType();
393
394 if (const auto *AT = T->getAsArrayTypeUnsafe()) {
395 // For primitive arrays, we don't save a QualType at all,
396 // just a PrimType. Try to figure out the QualType here.
397 if (isPrimitiveArray()) {
398 while (T->isArrayType())
399 T = T->getAsArrayTypeUnsafe()->getElementType();
400 return T;
401 }
402 return AT->getElementType();
403 }
404 if (const auto *CT = T->getAs<ComplexType>())
405 return CT->getElementType();
406 if (const auto *CT = T->getAs<VectorType>())
407 return CT->getElementType();
408
409 return T;
410}
411
413 auto MakeArrayType = [&](QualType ElemType) -> QualType {
414 if (IsArray)
415 return Ctx.getConstantArrayType(
416 ElemType, APInt(64, static_cast<uint64_t>(getNumElems()), false),
417 nullptr, ArraySizeModifier::Normal, 0);
418 return ElemType;
419 };
420
421 if (const auto *E = asExpr()) {
422 if (isa<CXXNewExpr>(E))
423 return MakeArrayType(E->getType()->getPointeeType());
424
425 // std::allocator.allocate() call.
426 if (const auto *ME = dyn_cast<CXXMemberCallExpr>(E);
427 ME && ME->getRecordDecl()->getName() == "allocator" &&
428 ME->getMethodDecl()->getName() == "allocate")
429 return MakeArrayType(E->getType()->getPointeeType());
430 return E->getType();
431 }
432
433 return getType();
434}
435
437 if (auto *D = dyn_cast<const Decl *>(Source))
438 return D->getLocation();
439 if (auto *E = dyn_cast<const Expr *>(Source))
440 return E->getExprLoc();
441 llvm_unreachable("Invalid descriptor type");
442}
443
445 if (const auto *D = dyn_cast<const Decl *>(Source))
446 return SourceInfo(D);
447 if (const auto *E = dyn_cast<const Expr *>(Source))
448 return SourceInfo(E);
449 llvm_unreachable("Invalid descriptor type");
450}
451
453 if (isPrimitive() || isPrimitiveArray())
454 return true;
455
456 if (isRecord()) {
457 assert(ElemRecord);
458 return ElemRecord->hasTrivialDtor();
459 }
460
461 if (!ElemDesc)
462 return true;
463 // Composite arrays.
464 return ElemDesc->hasTrivialDtor();
465}
466
467bool Descriptor::isUnion() const { return isRecord() && ElemRecord->isUnion(); }
#define V(N, I)
static void ctorRecord(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable, bool IsVolatile, bool IsActive, bool InUnion, const Descriptor *D)
static void dtorTy(Block *, std::byte *Ptr, const Descriptor *)
static BlockCtorFn getCtorArrayPrim(PrimType Type)
static void destroyField(Block *B, std::byte *Ptr, const Descriptor *D, unsigned FieldOffset)
static void initField(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable, bool IsVolatile, bool IsActive, bool IsUnionField, bool InUnion, const Descriptor *D, unsigned FieldOffset)
static void dtorArrayTy(Block *, std::byte *Ptr, const Descriptor *D)
static void ctorTy(Block *, std::byte *Ptr, bool, bool, bool, bool, bool, const Descriptor *)
static void ctorArrayDesc(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable, bool IsVolatile, bool IsActive, bool InUnion, const Descriptor *D)
static void destroyBase(Block *B, std::byte *Ptr, const Descriptor *D, unsigned FieldOffset)
static constexpr bool needsCtor()
static void dtorArrayDesc(Block *B, std::byte *Ptr, const Descriptor *D)
static BlockCtorFn getCtorPrim(PrimType T)
static bool needsRecordDtor(const Record *R)
Whether a record needs its descriptor dtor function called.
static BlockDtorFn getDtorArrayPrim(PrimType Type)
static void ctorArrayTy(Block *, std::byte *Ptr, bool, bool, bool, bool, bool, const Descriptor *D)
static BlockDtorFn getDtorPrim(PrimType T)
static void dtorRecord(Block *B, std::byte *Ptr, const Descriptor *D)
static void initBase(Block *B, std::byte *Ptr, bool IsConst, bool IsMutable, bool IsVolatile, bool IsActive, bool InUnion, const Descriptor *D, unsigned FieldOffset, bool IsVirtualBase)
Defines the clang::Expr interface and subclasses for C++ expressions.
#define TYPE_SWITCH(Expr, B)
Definition PrimType.h:211
__DEVICE__ int max(int __a, int __b)
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:220
QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize, const Expr *SizeExpr, ArraySizeModifier ASM, unsigned IndexTypeQuals) const
Return the unique reference to the type for a constant array of the specified element type.
CanQualType getCanonicalTagType(const TagDecl *TD) const
Complex values, per C99 6.2.5p11.
Definition TypeBase.h:3276
ASTContext & getASTContext() const LLVM_READONLY
Definition DeclBase.cpp:546
A (possibly-)qualified type.
Definition TypeBase.h:937
Represents a struct/union/class.
Definition Decl.h:4321
Encodes a location in the source.
The base class of the type hierarchy.
Definition TypeBase.h:1833
Represents a GCC generic vector type.
Definition TypeBase.h:4176
A memory block, either on the stack or in the heap.
Definition InterpBlock.h:44
Structure/Class descriptor.
Definition Record.h:25
bool isUnion() const
Checks if the record is a union.
Definition Record.h:57
llvm::iterator_range< const_virtual_iter > virtual_bases() const
Definition Record.h:103
llvm::iterator_range< const_base_iter > bases() const
Definition Record.h:92
llvm::iterator_range< const_field_iter > fields() const
Definition Record.h:84
Describes the statement/declaration an opcode was generated from.
Definition Source.h:74
void(*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc) BlockDtorFn
Invoked when a block is destroyed.
Definition Descriptor.h:40
llvm::PointerUnion< const Decl *, const Expr * > DeclTy
Definition Descriptor.h:29
bool NE(InterpState &S, CodePtr OpPC)
Definition Interp.h:1235
constexpr size_t align(size_t Size)
Aligns a size to the pointer alignment.
Definition PrimType.h:189
llvm::APInt APInt
Definition FixedPoint.h:19
PrimType
Enumeration of the primitive types of the VM.
Definition PrimType.h:34
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
Definition PrimType.cpp:23
void(*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsVolatile, bool IsActive, bool InUnion, const Descriptor *FieldDesc) BlockCtorFn
Invoked whenever a block is created.
Definition Descriptor.h:34
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
Definition Address.h:330
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
const FunctionProtoType * T
#define false
Definition stdbool.h:26
#define true
Definition stdbool.h:25
Token to denote structures of unknown size.
Definition Descriptor.h:140
Describes a memory block created by an allocation site.
Definition Descriptor.h:121
const bool IsConst
Flag indicating if the block is mutable.
Definition Descriptor.h:160
unsigned getAllocSize() const
Returns the allocated size, including metadata.
Definition Descriptor.h:241
unsigned getNumElems() const
Returns the number of elements stored in the block.
Definition Descriptor.h:248
bool isPrimitive() const
Checks if the descriptor is of a primitive.
Definition Descriptor.h:262
QualType getElemQualType() const
bool hasTrivialDtor() const
Whether variables of this descriptor need their destructor called or not.
const BlockDtorFn DtorFn
Definition Descriptor.h:172
const OptPrimType PrimT
The primitive type this descriptor was created for, or the primitive element type in case this is a p...
Definition Descriptor.h:158
const ValueDecl * asValueDecl() const
Definition Descriptor.h:213
const BlockCtorFn CtorFn
Storage management methods.
Definition Descriptor.h:171
static constexpr unsigned MaxArrayElemBytes
Maximum number of bytes to be used for array elements.
Definition Descriptor.h:147
QualType getType() const
const Decl * asDecl() const
Definition Descriptor.h:209
const Descriptor *const ElemDesc
Descriptor of the array element.
Definition Descriptor.h:154
SourceInfo getLoc() const
Descriptor(const DeclTy &D, const Type *SourceTy, PrimType Type, MetadataSize MD, bool IsConst, bool IsTemporary, bool IsMutable, bool IsVolatile)
Allocates a descriptor for a primitive.
SourceLocation getLocation() const
const bool IsMutable
Flag indicating if a field is mutable.
Definition Descriptor.h:162
QualType getDataType(const ASTContext &Ctx) const
std::optional< unsigned > MetadataSize
Definition Descriptor.h:142
const bool IsArray
Flag indicating if the block is an array.
Definition Descriptor.h:167
bool isPrimitiveArray() const
Checks if the descriptor is of an array of primitives.
Definition Descriptor.h:253
bool isRecord() const
Checks if the descriptor is of a record.
Definition Descriptor.h:267
const bool IsTemporary
Flag indicating if the block is a temporary.
Definition Descriptor.h:164
const Record *const ElemRecord
Pointer to the record, if block contains records.
Definition Descriptor.h:152
bool isUnion() const
Checks if the descriptor is of a union.
const Expr * asExpr() const
Definition Descriptor.h:210
bool isArray() const
Checks if the descriptor is of an array.
Definition Descriptor.h:265
A pointer-sized struct we use to allocate into data storage.
Definition InitMap.h:56
void deleteInitMap()
Delete the InitMap if one exists.
Definition InitMap.h:90
Inline descriptor embedded in structures and arrays.
Definition Descriptor.h:66
unsigned Offset
Offset inside the structure/array.
Definition Descriptor.h:68