clang
3.9.0
|
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/class. More...
#include <RecordLayout.h>
Classes | |
struct | VBaseInfo |
Public Types | |
typedef llvm::DenseMap< const CXXRecordDecl *, VBaseInfo > | VBaseOffsetsMapTy |
Public Member Functions | |
CharUnits | getAlignment () const |
getAlignment - Get the record alignment in characters. More... | |
CharUnits | getSize () const |
getSize - Get the record size in characters. More... | |
unsigned | getFieldCount () const |
getFieldCount - Get the number of fields in the layout. More... | |
uint64_t | getFieldOffset (unsigned FieldNo) const |
getFieldOffset - Get the offset of the given field index, in bits. More... | |
CharUnits | getDataSize () const |
getDataSize() - Get the record data size, which is the record size without tail padding, in characters. More... | |
CharUnits | getNonVirtualSize () const |
getNonVirtualSize - Get the non-virtual size (in chars) of an object, which is the size of the object without virtual bases. More... | |
CharUnits | getNonVirtualAlignment () const |
getNonVirtualSize - Get the non-virtual alignment (in chars) of an object, which is the alignment of the object without virtual bases. More... | |
const CXXRecordDecl * | getPrimaryBase () const |
getPrimaryBase - Get the primary base for this record. More... | |
bool | isPrimaryBaseVirtual () const |
isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not. More... | |
CharUnits | getBaseClassOffset (const CXXRecordDecl *Base) const |
getBaseClassOffset - Get the offset, in chars, for the given base class. More... | |
CharUnits | getVBaseClassOffset (const CXXRecordDecl *VBase) const |
getVBaseClassOffset - Get the offset, in chars, for the given base class. More... | |
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? If so, it is at offset zero. More... | |
bool | hasExtendableVFPtr () const |
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. More... | |
bool | hasOwnVBPtr () const |
hasOwnVBPtr - Does this class provide its own virtual-base table pointer, rather than inheriting one from a primary base class? More... | |
bool | hasVBPtr () const |
hasVBPtr - Does this class have a virtual function table pointer. More... | |
CharUnits | getRequiredAlignment () const |
bool | endsWithZeroSizedObject () const |
bool | leadsWithZeroSizedBase () const |
CharUnits | getVBPtrOffset () const |
getVBPtrOffset - Get the offset for virtual base table pointer. More... | |
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.
|
inline |
Definition at line 281 of file RecordLayout.h.
|
inline |
getAlignment - Get the record alignment in characters.
Definition at line 167 of file RecordLayout.h.
Referenced by clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), and clang::ASTContext::getDeclAlign().
|
inline |
getBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 219 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), CastToDerivedClass(), computeOffsetHint(), DiagnoseReinterpretUpDownCast(), DumpRecordLayout(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), getClassAtVTableLocation(), clang::CodeGen::CGCXXABI::getMemberPointerPathAdjustment(), clang::ASTContext::getOffsetOfBaseWithVBPtr(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().
|
inline |
Definition at line 297 of file RecordLayout.h.
Referenced by clang::ASTContext::getOffsetOfBaseWithVBPtr().
|
inline |
getDataSize() - Get the record data size, which is the record size without tail padding, in characters.
Definition at line 183 of file RecordLayout.h.
Referenced by clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), and clang::ASTContext::getTypeInfoDataSizeInChars().
|
inline |
getFieldCount - Get the number of fields in the layout.
Definition at line 173 of file RecordLayout.h.
References clang::ASTVector< T >::size().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::ASTContext::DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), and isDesignatorAtObjectEnd().
|
inline |
getFieldOffset - Get the offset of the given field index, in bits.
Definition at line 177 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), BitsContainNoUserData(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), emitAddrOfFieldStorage(), 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().
|
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 197 of file RecordLayout.h.
Referenced by DumpRecordLayout(), and EmitNullBaseClassInitialization().
|
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 189 of file RecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), and EmitNullBaseClassInitialization().
|
inline |
getPrimaryBase - Get the primary base for this record.
Definition at line 204 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases(), DumpRecordLayout(), and clang::CodeGen::CodeGenFunction::getVTablePointers().
|
inline |
Definition at line 277 of file RecordLayout.h.
|
inline |
getSize - Get the record size in characters.
Definition at line 170 of file RecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::ASTContext::DumpRecordLayout(), and DumpRecordLayout().
|
inline |
Definition at line 234 of file RecordLayout.h.
|
inline |
getVBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 227 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), CastToDerivedClass(), DumpRecordLayout(), findPathsToSubobject(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::MemRegion::getAsOffset(), getClassAtVTableLocation(), getOffsetOfFullPath(), clang::CodeGen::CodeGenFunction::getVTablePointers(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), and HandleLValueBase().
|
inline |
Definition at line 302 of file RecordLayout.h.
Referenced by DumpRecordLayout().
|
inline |
getVBPtrOffset - Get the offset for virtual base table pointer.
This is only meaningful with the Microsoft ABI.
Definition at line 292 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), and DumpRecordLayout().
|
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 254 of file RecordLayout.h.
|
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 266 of file RecordLayout.h.
References hasVBPtr().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), and DumpRecordLayout().
|
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 246 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), and DumpRecordLayout().
|
inline |
hasVBPtr - Does this class have a virtual function table pointer.
Definition at line 272 of file RecordLayout.h.
Referenced by hasOwnVBPtr().
|
inline |
isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not.
Definition at line 212 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases().
|
inline |
Definition at line 285 of file RecordLayout.h.
|
friend |
Definition at line 133 of file RecordLayout.h.