clang API Documentation

Classes | Public Member Functions | Friends
clang::ASTRecordLayout Class Reference

#include <RecordLayout.h>

List of all members.

Classes

struct  CXXRecordLayoutInfo
 CXXRecordLayoutInfo - Contains C++ specific layout information.

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 getNonVirtualAlign () const
const CXXRecordDeclgetPrimaryBase () 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.
uint64_t getBaseClassOffsetInBits (const CXXRecordDecl *Base) const
uint64_t getVBaseClassOffsetInBits (const CXXRecordDecl *VBase) const
CharUnits getSizeOfLargestEmptySubobject () const
CharUnits getVFPtrOffset () const
CharUnits getVBPtrOffset () const

Friends

class ASTContext

Detailed Description

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 35 of file RecordLayout.h.


Member Function Documentation

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

getAlignment - Get the record alignment in characters.

Definition at line 118 of file RecordLayout.h.

Referenced by DumpCXXRecordLayout(), clang::ASTContext::DumpRecordLayout(), clang::ASTContext::getDeclAlign(), and clang::CodeGen::CGBitFieldInfo::MakeInfo().

CharUnits clang::ASTRecordLayout::getBaseClassOffset ( const CXXRecordDecl Base) const [inline]
uint64_t clang::ASTRecordLayout::getBaseClassOffsetInBits ( const CXXRecordDecl Base) const [inline]

getBaseClassOffsetInBits - Get the offset, in bits, for the given base class.

Definition at line 188 of file RecordLayout.h.

References clang::Decl::getASTContext(), getBaseClassOffset(), clang::ASTContext::getCharWidth(), and clang::CharUnits::getQuantity().

Referenced by BitsContainNoUserData().

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 135 of file RecordLayout.h.

Referenced by DumpCXXRecordLayout(), and clang::ASTContext::DumpRecordLayout().

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

getFieldCount - Get the number of fields in the layout.

Definition at line 124 of file RecordLayout.h.

Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), and clang::ASTContext::DumpRecordLayout().

uint64_t clang::ASTRecordLayout::getFieldOffset ( unsigned  FieldNo) const [inline]
CharUnits clang::ASTRecordLayout::getNonVirtualAlign ( ) 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 149 of file RecordLayout.h.

Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), 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 141 of file RecordLayout.h.

Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), DumpCXXRecordLayout(), and EmitNullBaseClassInitialization().

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

getPrimaryBase - Get the primary base for this record.

Definition at line 156 of file RecordLayout.h.

Referenced by AddIndirectPrimaryBases(), CollectPrimaryBases(), DumpCXXRecordLayout(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointers().

CharUnits clang::ASTRecordLayout::getSize ( ) const [inline]
CharUnits clang::ASTRecordLayout::getSizeOfLargestEmptySubobject ( ) const [inline]

Definition at line 206 of file RecordLayout.h.

CharUnits clang::ASTRecordLayout::getVBaseClassOffset ( const CXXRecordDecl VBase) const [inline]
uint64_t clang::ASTRecordLayout::getVBaseClassOffsetInBits ( const CXXRecordDecl VBase) const [inline]

getVBaseClassOffsetInBits - Get the offset, in bits, for the given base class.

Definition at line 198 of file RecordLayout.h.

References clang::Decl::getASTContext(), clang::ASTContext::getCharWidth(), clang::CharUnits::getQuantity(), and getVBaseClassOffset().

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 220 of file RecordLayout.h.

Referenced by DumpCXXRecordLayout().

CharUnits clang::ASTRecordLayout::getVFPtrOffset ( ) const [inline]

getVFPtrOffset - Get the offset for virtual function table pointer. This is only meaningful with the Microsoft ABI.

Definition at line 213 of file RecordLayout.h.

Referenced by DumpCXXRecordLayout().

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

isPrimaryBaseVirtual - Get whether the primary base for this record is virtual or not.

Definition at line 164 of file RecordLayout.h.

Referenced by AddIndirectPrimaryBases().


Friends And Related Function Documentation

friend class ASTContext [friend]

Definition at line 89 of file RecordLayout.h.


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