clang: clang::ASTRecordLayout Class Reference (original) (raw)

ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/class. More...

#include "[clang/AST/RecordLayout.h](RecordLayout%5F8h%5Fsource.html)"

Public Member Functions
ASTRecordLayout (const ASTRecordLayout &)=delete
ASTRecordLayout & operator= (const ASTRecordLayout &)=delete
CharUnits getAlignment () const
getAlignment - Get the record alignment in characters.
CharUnits getPreferredAlignment () const
getPreferredFieldAlignment - Get the record preferred alignment in characters.
CharUnits getUnadjustedAlignment () const
getUnadjustedAlignment - Get the record alignment in characters, before alignment adjustment.
CharUnits getSize () const
getSize - Get the record size in characters.
unsigned getFieldCount () const
getFieldCount - Get the number of fields in the layout.
uint64_t getFieldOffset (unsigned FieldNo) const
getFieldOffset - Get the offset of the given field index, in bits.
CharUnits getDataSize () const
getDataSize() - Get the record data size, which is the record size without tail padding, in characters.
CharUnits getNonVirtualSize () const
getNonVirtualSize - Get the non-virtual size (in chars) of an object, which is the size of the object without virtual bases.
CharUnits getNonVirtualAlignment () const
getNonVirtualAlignment - Get the non-virtual alignment (in chars) of an object, which is the alignment of the object without virtual bases.
CharUnits getPreferredNVAlignment () const
getPreferredNVAlignment - Get the preferred non-virtual alignment (in chars) of an object, which is the preferred alignment of the object without virtual bases.
const CXXRecordDecl * getPrimaryBase () const
getPrimaryBase - Get the primary base for this record.
bool isPrimaryBaseVirtual () const
isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not.
CharUnits getBaseClassOffset (const CXXRecordDecl *Base) const
getBaseClassOffset - Get the offset, in chars, for the given base class.
CharUnits getVBaseClassOffset (const CXXRecordDecl *VBase) const
getVBaseClassOffset - Get the offset, in chars, for the given base class.
CharUnits getSizeOfLargestEmptySubobject () const
bool hasOwnVFPtr () const
hasOwnVFPtr - Does this class provide its own virtual-function table pointer, rather than inheriting one from a primary base class?
bool hasExtendableVFPtr () const
hasVFPtr - Does this class have a virtual function table pointer that can be extended by a derived class?
bool hasOwnVBPtr () const
hasOwnVBPtr - Does this class provide its own virtual-base table pointer, rather than inheriting one from a primary base class?
bool hasVBPtr () const
hasVBPtr - Does this class have a virtual function table pointer.
CharUnits getRequiredAlignment () const
bool endsWithZeroSizedObject () const
bool leadsWithZeroSizedBase () const
CharUnits getVBPtrOffset () const
getVBPtrOffset - Get the offset for virtual base table pointer.
const CXXRecordDecl * getBaseSharingVBPtr () const
const VBaseOffsetsMapTy & getVBaseOffsetsMap () const

ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/class.

The decl represented must be a definition, not a forward declaration. This class is also used to contain layout information for one ObjCInterfaceDecl. FIXME - Find appropriate name. These objects are managed by ASTContext.

Definition at line 38 of file RecordLayout.h.

VBaseOffsetsMapTy

endsWithZeroSizedObject()

bool clang::ASTRecordLayout::endsWithZeroSizedObject ( ) const inline

getAlignment()

CharUnits clang::ASTRecordLayout::getAlignment ( ) const inline

getBaseClassOffset()

getBaseClassOffset - Get the offset, in chars, for the given base class.

Definition at line 250 of file RecordLayout.h.

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::interp::IntPointer::baseCast(), BitsContainNoUserData(), calculateOffset(), CastToDerivedClass(), clang::CIRGen::CIRGenModule::computeNonVirtualBaseClassOffset(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), computeOffsetHint(), computeOffsetHint(), clang::interp::computePointerOffset(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), emitExactDynamicCast(), enumerateData(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::CIRGen::CIRGenFunction::getAddressOfDirectBaseInCompleteClass(), getDerivedToBaseAlignmentAndOffset(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::ASTContext::getOffsetOfBaseWithVBPtr(), getOffsetOfFullPath(), clang::CIRGen::CIRGenFunction::getOverlapForBaseInit(), clang::CodeGen::CodeGenFunction::getOverlapForBaseInit(), getSubobjectOffset(), clang::CIRGen::CIRGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CIRGen::CIRGenFunction::getVTTParameter(), clang::interp::InterpretOffsetOf(), clang::interp::Pointer::toAPValue(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().

getBaseSharingVBPtr()

const CXXRecordDecl * clang::ASTRecordLayout::getBaseSharingVBPtr ( ) const inline

getDataSize()

CharUnits clang::ASTRecordLayout::getDataSize ( ) const inline

getFieldCount()

unsigned clang::ASTRecordLayout::getFieldCount ( ) const inline

getFieldOffset()

uint64_t clang::ASTRecordLayout::getFieldOffset ( unsigned FieldNo) const inline

getFieldOffset - Get the offset of the given field index, in bits.

Definition at line 201 of file RecordLayout.h.

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::interp::IntPointer::atOffset(), BitsContainNoUserData(), calculateOffset(), clang::interp::computePointerOffset(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), EncodeBitField(), enumerateData(), getBaseAlignmentAndOffsetFromLValue(), clang::ASTContext::getDeclAlign(), GetFieldOffset(), getFieldOffset(), getFieldOffsetInBits(), clang::VarDecl::getFlexibleArrayInitChars(), clang::CIRGen::CIRGenFunction::getOverlapForFieldInit(), clang::CodeGen::CodeGenFunction::getOverlapForFieldInit(), clang::interp::InterpretOffsetOf(), isIntegerLikeType(), clang::ASTContext::lookupFieldBitOffset(), clang::Sema::LookupInlineAsmField(), setUsedBits(), and clang::interp::Pointer::toAPValue().

getNonVirtualAlignment()

CharUnits clang::ASTRecordLayout::getNonVirtualAlignment ( ) const inline

getNonVirtualSize()

CharUnits clang::ASTRecordLayout::getNonVirtualSize ( ) const inline

getNonVirtualSize - Get the non-virtual size (in chars) of an object, which is the size of the object without virtual bases.

Definition at line 211 of file RecordLayout.h.

Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CIRGen::CIRGenTypes::computeRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), EmitNullBaseClassInitialization(), emitNullBaseClassInitialization(), EmitNullConstant(), emitNullConstant(), clang::CIRGen::CIRGenFunction::getOverlapForBaseInit(), clang::CodeGen::CodeGenFunction::getOverlapForBaseInit(), clang::CIRGen::CIRGenFunction::getOverlapForFieldInit(), and clang::CodeGen::CodeGenFunction::getOverlapForFieldInit().

getPreferredAlignment()

CharUnits clang::ASTRecordLayout::getPreferredAlignment ( ) const inline

getPreferredNVAlignment()

CharUnits clang::ASTRecordLayout::getPreferredNVAlignment ( ) const inline

getPreferredNVAlignment - Get the preferred non-virtual alignment (in chars) of an object, which is the preferred alignment of the object without virtual bases.

Definition at line 228 of file RecordLayout.h.

Referenced by DumpRecordLayout().

getPrimaryBase()

const CXXRecordDecl * clang::ASTRecordLayout::getPrimaryBase ( ) const inline

getRequiredAlignment()

CharUnits clang::ASTRecordLayout::getRequiredAlignment ( ) const inline

getSize()

CharUnits clang::ASTRecordLayout::getSize ( ) const inline

getSizeOfLargestEmptySubobject()

CharUnits clang::ASTRecordLayout::getSizeOfLargestEmptySubobject ( ) const inline

getUnadjustedAlignment()

CharUnits clang::ASTRecordLayout::getUnadjustedAlignment ( ) const inline

getVBaseClassOffset()

getVBaseClassOffset - Get the offset, in chars, for the given base class.

Definition at line 260 of file RecordLayout.h.

References clang::CXXRecordDecl::getDefinition().

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), calculateOffset(), CastToDerivedClass(), clang::interp::computePointerOffset(), DumpRecordLayout(), emitExactDynamicCast(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CIRGen::CIRGenFunction::getAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::CIRGen::CIRGenFunction::getAddressOfDirectBaseInCompleteClass(), getOffsetOfFullPath(), clang::CIRGen::CIRGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CIRGen::CIRGenFunction::getVTTParameter(), HandleLValueBase(), clang::interp::Pointer::toAPValue(), and vfptrIsEarlierInMDC().

getVBaseOffsetsMap()

const VBaseOffsetsMapTy & clang::ASTRecordLayout::getVBaseOffsetsMap ( ) const inline

getVBPtrOffset()

CharUnits clang::ASTRecordLayout::getVBPtrOffset ( ) const inline

hasExtendableVFPtr()

bool clang::ASTRecordLayout::hasExtendableVFPtr ( ) const inline

hasVFPtr - Does this class have a virtual function table pointer that can be extended by a derived class?

This is synonymous with this class having a VFPtr at offset zero.

Definition at line 289 of file RecordLayout.h.

hasOwnVBPtr()

bool clang::ASTRecordLayout::hasOwnVBPtr ( ) const inline

hasOwnVFPtr()

bool clang::ASTRecordLayout::hasOwnVFPtr ( ) const inline

hasVBPtr()

bool clang::ASTRecordLayout::hasVBPtr ( ) const inline

isPrimaryBaseVirtual()

bool clang::ASTRecordLayout::isPrimaryBaseVirtual ( ) const inline

leadsWithZeroSizedBase()

bool clang::ASTRecordLayout::leadsWithZeroSizedBase ( ) const inline

operator=()

ASTContext


The documentation for this class was generated from the following files: