22 if (!Base.isBlockPointer())
25 unsigned BlockMDSize = Base.block()->getDescriptor()->getMetadataSize();
29 if (Base.BS.Base <
static_cast<unsigned>(PtrOffset) ||
30 (Base.BS.Base - PtrOffset < BlockMDSize))
35 (PtrOffset < 0 ? Base.atField(-PtrOffset) : Base.atFieldSub(PtrOffset));
42 Offset += BlockMDSize;
44 if (
const auto *FD = dyn_cast<FieldDecl>(
getDecl())) {
45 if (FD->getParent() == BaseRecord->
getDecl())
55 if (
const RecordDecl *BaseDecl = Base.getDeclPtr().getRecord()->getDecl();
56 BaseDecl != FieldParent)
62 for (
const NamedDecl *ND : IFD->chain()) {
75 return Pointer(
const_cast<Block *
>(Base.block()), Offset, Offset);
84 return Base.toAPValue(ASTCtx);
94 if (this->PathLength != RHS.PathLength)
97 if (PathLength != 0 &&
98 std::memcmp(Path, RHS.Path, PathLength *
sizeof(
CXXRecordDecl *)) != 0)
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a C++ struct/union/class.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Represents a member of a struct/union/class.
const RecordDecl * getParent() const
Returns the parent of this field declaration, which is the struct in which this field is defined.
This represents a decl that may have a name.
Represents a struct/union/class.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
A memory block, either on the stack or in the heap.
unsigned getSize() const
Returns the size of the block.
Holds all information required to evaluate constexpr code in a module.
unsigned collectBaseOffset(const RecordDecl *BaseDecl, const RecordDecl *DerivedDecl) const
const Record * getRecord(const RecordDecl *D) const
const ValueDecl * getDecl() const
Return the base declaration. Might be null.
APValue toAPValue(const ASTContext &) const
bool isDerivedMember() const
ComparisonCategoryResult compare(const MemberPointer &RHS) const
std::optional< Pointer > toPointer(const Context &Ctx) const
A pointer to a memory block, live or dead.
Pointer atField(unsigned Off) const
Creates a pointer to a field.
const Block * block() const
const Record * getRecord() const
Returns the record descriptor of a class.
Structure/Class descriptor.
const RecordDecl * getDecl() const
Returns the underlying declaration.
const Field * getField(unsigned I) const
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
ComparisonCategoryResult
An enumeration representing the possible results of a three-way comparison.
U cast(CodeGen::Address addr)