struct Descriptor
Declaration
struct Descriptor { /* full declaration omitted */ };
Description
Describes a memory block created by an allocation site.
Declared at: clang/lib/AST/Interp/Descriptor.h:51
Member Variables
- private const clang::interp::DeclTy Source
- Original declaration, used to emit the error message.
- private const clang::interp::InterpSize ElemSize
- Size of an element, in host bytes.
- private const clang::interp::InterpSize Size
- Size of the storage, in host bytes.
- private const clang::interp::InterpSize AllocSize
- Size of the allocation (storage + metadata), in host bytes.
- public clang::interp::Record* const ElemRecord = nullptr
- Pointer to the record, if block contains records.
- public clang::interp::Descriptor* const ElemDesc = nullptr
- Descriptor of the array element.
- public const bool IsConst = false
- Flag indicating if the block is mutable.
- public const bool IsMutable = false
- Flag indicating if a field is mutable.
- public const bool IsTemporary = false
- Flag indicating if the block is a temporary.
- public const bool IsArray = false
- Flag indicating if the block is an array.
- public const clang::interp::BlockCtorFn CtorFn = nullptr
- Storage management methods.
- public const clang::interp::BlockDtorFn DtorFn = nullptr
- public const clang::interp::BlockMoveFn MoveFn = nullptr
- private static const unsigned int UnknownSizeMark = (unsigned int)-1
- Value to denote arrays of unknown size.
Method Overview
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::PrimType Type, size_t NumElems, bool IsConst, bool IsTemporary, bool IsMutable)
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::PrimType Type, bool IsTemporary, clang::interp::Descriptor::UnknownSize)
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::Descriptor * Elem, unsigned int NumElems, bool IsConst, bool IsTemporary, bool IsMutable)
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::Descriptor * Elem, bool IsTemporary, clang::interp::Descriptor::UnknownSize)
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::Record * R, bool IsConst, bool IsTemporary, bool IsMutable)
- public Descriptor(const clang::interp::DeclTy & D, clang::interp::PrimType Type, bool IsConst, bool IsTemporary, bool IsMutable)
- public const clang::Decl * asDecl() const
- public const clang::Expr * asExpr() const
- public const clang::FieldDecl * asFieldDecl() const
- public const clang::RecordDecl * asRecordDecl() const
- public const clang::ValueDecl * asValueDecl() const
- public unsigned int getAllocSize() const
- public unsigned int getElemSize() const
- public clang::SourceLocation getLocation() const
- public unsigned int getNumElems() const
- public unsigned int getSize() const
- public clang::QualType getType() const
- public bool isArray() const
- public bool isPrimitive() const
- public bool isPrimitiveArray() const
- public bool isUnknownSizeArray() const
- public bool isZeroSizeArray() const
Methods
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
size_t NumElems,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
size_t NumElems,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Description
Allocates a descriptor for an array of primitives.
Declared at: clang/lib/AST/Interp/Descriptor.h:92
Parameters
- const clang::interp::DeclTy& D
- clang::interp::PrimType Type
- size_t NumElems
- bool IsConst
- bool IsTemporary
- bool IsMutable
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
bool IsTemporary,
clang::interp::Descriptor::UnknownSize)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
bool IsTemporary,
clang::interp::Descriptor::UnknownSize)
Description
Allocates a descriptor for an array of primitives of unknown size.
Declared at: clang/lib/AST/Interp/Descriptor.h:96
Parameters
- const clang::interp::DeclTy& D
- clang::interp::PrimType Type
- bool IsTemporary
- clang::interp::Descriptor::UnknownSize
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::Descriptor* Elem,
unsigned int NumElems,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::Descriptor* Elem,
unsigned int NumElems,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Description
Allocates a descriptor for an array of composites.
Declared at: clang/lib/AST/Interp/Descriptor.h:99
Parameters
- const clang::interp::DeclTy& D
- clang::interp::Descriptor* Elem
- unsigned int NumElems
- bool IsConst
- bool IsTemporary
- bool IsMutable
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::Descriptor* Elem,
bool IsTemporary,
clang::interp::Descriptor::UnknownSize)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::Descriptor* Elem,
bool IsTemporary,
clang::interp::Descriptor::UnknownSize)
Description
Allocates a descriptor for an array of composites of unknown size.
Declared at: clang/lib/AST/Interp/Descriptor.h:103
Parameters
- const clang::interp::DeclTy& D
- clang::interp::Descriptor* Elem
- bool IsTemporary
- clang::interp::Descriptor::UnknownSize
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::Record* R,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::Record* R,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Description
Allocates a descriptor for a record.
Declared at: clang/lib/AST/Interp/Descriptor.h:106
Parameters
- const clang::interp::DeclTy& D
- clang::interp::Record* R
- bool IsConst
- bool IsTemporary
- bool IsMutable
¶Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Descriptor(const clang::interp::DeclTy& D,
clang::interp::PrimType Type,
bool IsConst,
bool IsTemporary,
bool IsMutable)
Description
Allocates a descriptor for a primitive.
Declared at: clang/lib/AST/Interp/Descriptor.h:88
Parameters
- const clang::interp::DeclTy& D
- clang::interp::PrimType Type
- bool IsConst
- bool IsTemporary
- bool IsMutable
¶const clang::Decl* asDecl() const
const clang::Decl* asDecl() const
Declared at: clang/lib/AST/Interp/Descriptor.h:112
¶const clang::Expr* asExpr() const
const clang::Expr* asExpr() const
Declared at: clang/lib/AST/Interp/Descriptor.h:113
¶const clang::FieldDecl* asFieldDecl() const
const clang::FieldDecl* asFieldDecl() const
Declared at: clang/lib/AST/Interp/Descriptor.h:119
¶const clang::RecordDecl* asRecordDecl() const
const clang::RecordDecl* asRecordDecl() const
Declared at: clang/lib/AST/Interp/Descriptor.h:123
¶const clang::ValueDecl* asValueDecl() const
const clang::ValueDecl* asValueDecl() const
Declared at: clang/lib/AST/Interp/Descriptor.h:115
¶unsigned int getAllocSize() const
unsigned int getAllocSize() const
Description
Returns the allocated size, including metadata.
Declared at: clang/lib/AST/Interp/Descriptor.h:134
¶unsigned int getElemSize() const
unsigned int getElemSize() const
Description
returns the size of an element when the structure is viewed as an array.
Declared at: clang/lib/AST/Interp/Descriptor.h:136
¶clang::SourceLocation getLocation() const
clang::SourceLocation getLocation() const
Declared at: clang/lib/AST/Interp/Descriptor.h:110
¶unsigned int getNumElems() const
unsigned int getNumElems() const
Description
Returns the number of elements stored in the block.
Declared at: clang/lib/AST/Interp/Descriptor.h:139
¶unsigned int getSize() const
unsigned int getSize() const
Description
Returns the size of the object without metadata.
Declared at: clang/lib/AST/Interp/Descriptor.h:128
¶clang::QualType getType() const
clang::QualType getType() const
Declared at: clang/lib/AST/Interp/Descriptor.h:109
¶bool isArray() const
bool isArray() const
Description
Checks if the descriptor is of an array.
Declared at: clang/lib/AST/Interp/Descriptor.h:154
¶bool isPrimitive() const
bool isPrimitive() const
Description
Checks if the descriptor is of a primitive.
Declared at: clang/lib/AST/Interp/Descriptor.h:151
¶bool isPrimitiveArray() const
bool isPrimitiveArray() const
Description
Checks if the descriptor is of an array of primitives.
Declared at: clang/lib/AST/Interp/Descriptor.h:144
¶bool isUnknownSizeArray() const
bool isUnknownSizeArray() const
Description
Checks if the descriptor is of an array of unknown size.
Declared at: clang/lib/AST/Interp/Descriptor.h:148
¶bool isZeroSizeArray() const
bool isZeroSizeArray() const
Description
Checks if the descriptor is of an array of zero size.
Declared at: clang/lib/AST/Interp/Descriptor.h:146