clang
7.0.0
|
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/class. More...
#include "clang/AST/RecordLayout.h"
Classes | |
struct | VBaseInfo |
Public Types | |
using | VBaseOffsetsMapTy = llvm::DenseMap< const CXXRecordDecl *, VBaseInfo > |
Public Member Functions | |
ASTRecordLayout (const ASTRecordLayout &)=delete | |
ASTRecordLayout & | operator= (const ASTRecordLayout &)=delete |
CharUnits | getAlignment () const |
getAlignment - Get the record alignment in characters. More... | |
CharUnits | getUnadjustedAlignment () const |
getUnadjustedAlignment - Get the record alignment in characters, before alignment adjustement. 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 39 of file RecordLayout.h.
using clang::ASTRecordLayout::VBaseOffsetsMapTy = llvm::DenseMap<const CXXRecordDecl *, VBaseInfo> |
Definition at line 60 of file RecordLayout.h.
|
delete |
|
inline |
Definition at line 295 of file RecordLayout.h.
Referenced by recordUsesEBO().
|
inline |
getAlignment - Get the record alignment in characters.
Definition at line 177 of file RecordLayout.h.
Referenced by clang::ASTContext::DumpRecordLayout(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), and clang::ASTContext::getDeclAlign().
|
inline |
getBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 233 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), calculateOffset(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ASTContext::getOffsetOfBaseWithVBPtr(), getTypeInfoVTable(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), and clang::CodeGen::CodeGenFunction::overlapForBaseInit().
|
inline |
Definition at line 311 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 197 of file RecordLayout.h.
Referenced by clang::ASTContext::DumpRecordLayout(), and clang::ASTContext::getTypeInfoDataSizeInChars().
|
inline |
getFieldCount - Get the number of fields in the layout.
Definition at line 187 of file RecordLayout.h.
References clang::ASTVector< T >::size().
Referenced by clang::ASTContext::DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), and isDesignatorAtObjectEnd().
|
inline |
getFieldOffset - Get the offset of the given field index, in bits.
Definition at line 191 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::ASTContext::DumpRecordLayout(), emitAddrOfFieldStorage(), clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::ASTContext::getDeclAlign(), getFieldOffset(), GetGCAttrTypeForType(), clang::CodeGen::CodeGenTBAA::getTBAAStructInfo(), and clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo().
|
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 211 of file RecordLayout.h.
Referenced by 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 203 of file RecordLayout.h.
Referenced by EmitNullBaseClassInitialization(), clang::CodeGen::CodeGenFunction::overlapForBaseInit(), and recordUsesEBO().
|
inline |
getPrimaryBase - Get the primary base for this record.
Definition at line 218 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), and DumpRecordLayout().
|
inline |
Definition at line 291 of file RecordLayout.h.
Referenced by recordUsesEBO().
|
inline |
getSize - Get the record size in characters.
Definition at line 184 of file RecordLayout.h.
Referenced by clang::ASTContext::DumpRecordLayout(), and hasMRCWeakIvars().
|
inline |
Definition at line 248 of file RecordLayout.h.
|
inline |
getUnadjustedAlignment - Get the record alignment in characters, before alignment adjustement.
Definition at line 181 of file RecordLayout.h.
|
inline |
getVBaseClassOffset - Get the offset, in chars, for the given base class.
Definition at line 241 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), calculateOffset(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::CodeGen::CodeGenFunction::GetVTTParameter(), HandleLValueBase(), and vfptrIsEarlierInMDC().
|
inline |
Definition at line 316 of file RecordLayout.h.
Referenced by detectAmbiguousBases(), isDeletingDtor(), and RequiresVtordisp().
|
inline |
getVBPtrOffset - Get the offset for virtual base table pointer.
This is only meaningful with the Microsoft ABI.
Definition at line 306 of file RecordLayout.h.
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), detectAmbiguousBases(), DumpRecordLayout(), emitCXXDestructor(), and emitRTtypeidCall().
|
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 268 of file RecordLayout.h.
Referenced by RequiresVtordisp().
|
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 280 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 260 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 286 of file RecordLayout.h.
Referenced by hasOwnVBPtr().
|
inline |
isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not.
Definition at line 226 of file RecordLayout.h.
Referenced by AddIndirectPrimaryBases(), and clang::CodeGen::CGDebugInfo::completeUnusedClass().
|
inline |
Definition at line 299 of file RecordLayout.h.
Referenced by recordUsesEBO().
|
delete |
|
friend |
Definition at line 63 of file RecordLayout.h.