clang API Documentation
#include <RecordLayout.h>
Classes | |
struct | CXXRecordLayoutInfo |
CXXRecordLayoutInfo - Contains C++ specific layout information. | |
struct | VBaseInfo |
Public Types | |
typedef llvm::DenseMap< const CXXRecordDecl *, VBaseInfo > | VBaseOffsetsMapTy |
Public Member Functions | |
CharUnits | getAlignment () const |
getAlignment - Get the record alignment in characters. | |
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 |
CharUnits | getDataSize () const |
CharUnits | getNonVirtualSize () const |
CharUnits | getNonVirtualAlignment () const |
const CXXRecordDecl * | getPrimaryBase () const |
getPrimaryBase - Get the primary base for this record. | |
bool | isPrimaryBaseVirtual () const |
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 |
bool | hasExtendableVFPtr () const |
bool | hasOwnVBPtr () const |
bool | hasVBPtr () const |
hasVBPtr - Does this class have a virtual function table pointer. | |
CharUnits | getRequiredAlignment () const |
bool | hasZeroSizedSubObject () const |
bool | leadsWithZeroSizedBase () const |
CharUnits | getVBPtrOffset () const |
const CXXRecordDecl * | getBaseSharingVBPtr () const |
const VBaseOffsetsMapTy & | getVBaseOffsetsMap () const |
Friends | |
class | ASTContext |
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 34 of file RecordLayout.h.
typedef llvm::DenseMap<const CXXRecordDecl *, VBaseInfo> clang::ASTRecordLayout::VBaseOffsetsMapTy |
Definition at line 57 of file RecordLayout.h.
CharUnits clang::ASTRecordLayout::getAlignment | ( | ) | const [inline] |
getAlignment - Get the record alignment in characters.
Definition at line 171 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout(), clang::ASTContext::DumpRecordLayout(), and clang::ASTContext::getDeclAlign().
CharUnits clang::ASTRecordLayout::getBaseClassOffset | ( | const CXXRecordDecl * | Base | ) | const [inline] |
getBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 224 of file RecordLayout.h.
References clang::CodeGen::Base.
Referenced by BitsContainNoUserData(), CastToDerivedClass(), computeOffsetHint(), DiagnoseReinterpretUpDownCast(), DumpCXXRecordLayout(), findPathForVPtr(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().
const CXXRecordDecl* clang::ASTRecordLayout::getBaseSharingVBPtr | ( | ) | const [inline] |
Definition at line 302 of file RecordLayout.h.
CharUnits clang::ASTRecordLayout::getDataSize | ( | ) | const [inline] |
getDataSize() - Get the record data size, which is the record size without tail padding, in characters.
Definition at line 188 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout(), clang::ASTContext::DumpRecordLayout(), and clang::ASTContext::getTypeInfoDataSizeInChars().
unsigned clang::ASTRecordLayout::getFieldCount | ( | ) | const [inline] |
getFieldCount - Get the number of fields in the layout.
Definition at line 177 of file RecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::ASTContext::DumpRecordLayout(), and clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue().
uint64_t clang::ASTRecordLayout::getFieldOffset | ( | unsigned | FieldNo | ) | const [inline] |
getFieldOffset - Get the offset of the given field index, in bits.
Definition at line 181 of file RecordLayout.h.
Referenced by BitsContainNoUserData(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpCXXRecordLayout(), clang::ASTContext::DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), EncodeBitField(), clang::ento::MemRegion::getAsOffset(), clang::ASTContext::getDeclAlign(), getFieldOffset(), clang::CodeGen::CodeGenTBAA::getTBAAStructTypeInfo(), isIntegerLikeType(), LookupFieldBitOffset(), and clang::Sema::LookupInlineAsmField().
CharUnits clang::ASTRecordLayout::getNonVirtualAlignment | ( | ) | const [inline] |
getNonVirtualSize - Get the non-virtual alignment (in chars) of an object, which is the alignment of the object without virtual bases.
Definition at line 202 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout(), and EmitNullBaseClassInitialization().
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 194 of file RecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpCXXRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), and EmitNullBaseClassInitialization().
const CXXRecordDecl* clang::ASTRecordLayout::getPrimaryBase | ( | ) | const [inline] |
getPrimaryBase - Get the primary base for this record.
Definition at line 209 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases(), DumpCXXRecordLayout(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointers().
CharUnits clang::ASTRecordLayout::getRequiredAlignment | ( | ) | const [inline] |
Definition at line 282 of file RecordLayout.h.
CharUnits clang::ASTRecordLayout::getSize | ( | ) | const [inline] |
getSize - Get the record size in characters.
Definition at line 174 of file RecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpCXXRecordLayout(), and clang::ASTContext::DumpRecordLayout().
CharUnits clang::ASTRecordLayout::getSizeOfLargestEmptySubobject | ( | ) | const [inline] |
Definition at line 239 of file RecordLayout.h.
CharUnits clang::ASTRecordLayout::getVBaseClassOffset | ( | const CXXRecordDecl * | VBase | ) | const [inline] |
getVBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 232 of file RecordLayout.h.
Referenced by CastToDerivedClass(), DumpCXXRecordLayout(), findPathForVPtr(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), HandleLValueBase(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointers().
const VBaseOffsetsMapTy& clang::ASTRecordLayout::getVBaseOffsetsMap | ( | ) | const [inline] |
Definition at line 307 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout().
CharUnits clang::ASTRecordLayout::getVBPtrOffset | ( | ) | const [inline] |
getVBPtrOffset - Get the offset for virtual base table pointer. This is only meaningful with the Microsoft ABI.
Definition at line 297 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout().
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 259 of file RecordLayout.h.
Referenced by performBaseAdjustment().
bool clang::ASTRecordLayout::hasOwnVBPtr | ( | ) | const [inline] |
hasOwnVBPtr - Does this class provide its own virtual-base table pointer, rather than inheriting one from a primary base class?
This implies that the ABI has no primary base class, meaning that it has no base classes that are suitable under the conditions of the ABI.
Definition at line 271 of file RecordLayout.h.
References hasVBPtr().
Referenced by DumpCXXRecordLayout().
bool clang::ASTRecordLayout::hasOwnVFPtr | ( | ) | const [inline] |
hasOwnVFPtr - Does this class provide its own virtual-function table pointer, rather than inheriting one from a primary base class? If so, it is at offset zero.
This implies that the ABI has no primary base class, meaning that it has no base classes that are suitable under the conditions of the ABI.
Definition at line 251 of file RecordLayout.h.
Referenced by DumpCXXRecordLayout().
bool clang::ASTRecordLayout::hasVBPtr | ( | ) | const [inline] |
hasVBPtr - Does this class have a virtual function table pointer.
Definition at line 277 of file RecordLayout.h.
Referenced by hasOwnVBPtr().
bool clang::ASTRecordLayout::hasZeroSizedSubObject | ( | ) | const [inline] |
Definition at line 286 of file RecordLayout.h.
bool clang::ASTRecordLayout::isPrimaryBaseVirtual | ( | ) | const [inline] |
isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not.
Definition at line 217 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases().
bool clang::ASTRecordLayout::leadsWithZeroSizedBase | ( | ) | const [inline] |
Definition at line 290 of file RecordLayout.h.
friend class ASTContext [friend] |
Definition at line 136 of file RecordLayout.h.