clang API Documentation

Public Types | Public Member Functions
clang::VTableContext Class Reference

#include <VTableBuilder.h>

List of all members.

Public Types

typedef SmallVector< std::pair
< uint64_t, ThunkInfo >, 1 > 
VTableThunksTy
typedef SmallVector< ThunkInfo, 1 > ThunkInfoVectorTy

Public Member Functions

 VTableContext (ASTContext &Context)
 ~VTableContext ()
const VTableLayoutgetVTableLayout (const CXXRecordDecl *RD)
VTableLayoutcreateConstructionVTableLayout (const CXXRecordDecl *MostDerivedClass, CharUnits MostDerivedClassOffset, bool MostDerivedClassIsVirtual, const CXXRecordDecl *LayoutClass)
const ThunkInfoVectorTygetThunkInfo (const CXXMethodDecl *MD)
uint64_t getNumVirtualFunctionPointers (const CXXRecordDecl *RD)
uint64_t getMethodVTableIndex (GlobalDecl GD)
CharUnits getVirtualBaseOffsetOffset (const CXXRecordDecl *RD, const CXXRecordDecl *VBase)

Detailed Description

Definition at line 264 of file VTableBuilder.h.


Member Typedef Documentation

Definition at line 270 of file VTableBuilder.h.

typedef SmallVector<std::pair<uint64_t, ThunkInfo>, 1> clang::VTableContext::VTableThunksTy

Definition at line 269 of file VTableBuilder.h.


Constructor & Destructor Documentation

clang::VTableContext::VTableContext ( ASTContext Context) [inline]

Definition at line 309 of file VTableBuilder.h.

VTableContext::~VTableContext ( )

Definition at line 2167 of file VTableBuilder.cpp.


Member Function Documentation

VTableLayout * VTableContext::createConstructionVTableLayout ( const CXXRecordDecl MostDerivedClass,
CharUnits  MostDerivedClassOffset,
bool  MostDerivedClassIsVirtual,
const CXXRecordDecl LayoutClass 
)
uint64_t VTableContext::getMethodVTableIndex ( GlobalDecl  GD)

getMethodVTableIndex - Return the index (relative to the vtable address point) where the function pointer for the given virtual function is stored.

Definition at line 2302 of file VTableBuilder.cpp.

References clang::GlobalDecl::getDecl().

Referenced by clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualCall(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall(), and clang::CodeGen::CodeGenFunction::BuildVirtualCall().

uint64_t VTableContext::getNumVirtualFunctionPointers ( const CXXRecordDecl RD)

getNumVirtualFunctionPointers - Return the number of virtual function pointers in the vtable for a given record decl.

Definition at line 2289 of file VTableBuilder.cpp.

const ThunkInfoVectorTy* clang::VTableContext::getThunkInfo ( const CXXMethodDecl MD) [inline]
CharUnits VTableContext::getVirtualBaseOffsetOffset ( const CXXRecordDecl RD,
const CXXRecordDecl VBase 
)

getVirtualBaseOffsetOffset - Return the offset in chars (relative to the vtable address point) where the offset of the virtual base that contains the given base is stored, otherwise, if no virtual base contains the given class, return 0. Base must be a virtual base class or an unambigious base.

Definition at line 2317 of file VTableBuilder.cpp.

References clang::CharUnits::Zero().

Referenced by clang::CodeGen::CodeGenFunction::GetVirtualBaseClassOffset().

const VTableLayout& clang::VTableContext::getVTableLayout ( const CXXRecordDecl RD) [inline]

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