clang 17.0.0git
|
#include "clang/AST/VTableBuilder.h"
Public Types | |
enum | VTableComponentLayout { Pointer , Relative } |
![]() | |
typedef SmallVector< ThunkInfo, 1 > | ThunkInfoVectorTy |
Public Member Functions | |
ItaniumVTableContext (ASTContext &Context, VTableComponentLayout ComponentLayout=Pointer) | |
~ItaniumVTableContext () override | |
const VTableLayout & | getVTableLayout (const CXXRecordDecl *RD) |
std::unique_ptr< VTableLayout > | createConstructionVTableLayout (const CXXRecordDecl *MostDerivedClass, CharUnits MostDerivedClassOffset, bool MostDerivedClassIsVirtual, const CXXRecordDecl *LayoutClass) |
uint64_t | getMethodVTableIndex (GlobalDecl GD) |
Locate a virtual function in the vtable. | |
CharUnits | getVirtualBaseOffsetOffset (const CXXRecordDecl *RD, const CXXRecordDecl *VBase) |
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. | |
VTableComponentLayout | getVTableComponentLayout () const |
bool | isPointerLayout () const |
bool | isRelativeLayout () const |
![]() | |
bool | isMicrosoft () const |
virtual | ~VTableContextBase () |
virtual const ThunkInfoVectorTy * | getThunkInfo (GlobalDecl GD) |
Static Public Member Functions | |
static bool | classof (const VTableContextBase *VT) |
![]() | |
static bool | hasVtableSlot (const CXXMethodDecl *MD) |
Determine whether this function should be assigned a vtable slot. | |
Additional Inherited Members | |
![]() | |
bool | IsMicrosoftABI |
![]() | |
typedef llvm::DenseMap< const CXXMethodDecl *, ThunkInfoVectorTy > | ThunksMapTy |
![]() | |
virtual void | computeVTableRelatedInformation (const CXXRecordDecl *RD)=0 |
Compute and store all vtable related information (vtable layout, vbase offset offsets, thunks etc) for the given record decl. | |
VTableContextBase (bool MS) | |
![]() | |
ThunksMapTy | Thunks |
Contains all thunks that a given method decl will need. | |
Definition at line 363 of file VTableBuilder.h.
Enumerator | |
---|---|
Pointer | Components in the vtable are pointers to other structs/functions. |
Relative | Components in the vtable are relative offsets between the vtable and the other structs/functions. |
Definition at line 390 of file VTableBuilder.h.
ItaniumVTableContext::ItaniumVTableContext | ( | ASTContext & | Context, |
VTableComponentLayout | ComponentLayout = Pointer |
||
) |
Definition at line 2265 of file VTableBuilder.cpp.
|
override |
Definition at line 2269 of file VTableBuilder.cpp.
|
inlinestatic |
Definition at line 428 of file VTableBuilder.h.
References clang::VTableContextBase::isMicrosoft().
std::unique_ptr< VTableLayout > ItaniumVTableContext::createConstructionVTableLayout | ( | const CXXRecordDecl * | MostDerivedClass, |
CharUnits | MostDerivedClassOffset, | ||
bool | MostDerivedClassIsVirtual, | ||
const CXXRecordDecl * | LayoutClass | ||
) |
Definition at line 2363 of file VTableBuilder.cpp.
References CreateVTableLayout().
uint64_t ItaniumVTableContext::getMethodVTableIndex | ( | GlobalDecl | GD | ) |
Locate a virtual function in the vtable.
Return the index (relative to the vtable address point) where the function pointer for the given virtual function is stored.
Definition at line 2271 of file VTableBuilder.cpp.
References clang::GlobalDecl::getCanonicalDecl(), clang::GlobalDecl::getDecl(), and clang::DeclContext::getParent().
Referenced by BuildAppleKextVirtualCall().
CharUnits ItaniumVTableContext::getVirtualBaseOffsetOffset | ( | const CXXRecordDecl * | RD, |
const CXXRecordDecl * | VBase | ||
) |
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 unambiguous base.
Definition at line 2287 of file VTableBuilder.cpp.
References clang::CharUnits::Zero().
|
inline |
Definition at line 432 of file VTableBuilder.h.
|
inline |
Definition at line 403 of file VTableBuilder.h.
Referenced by BuildAppleKextVirtualCall(), and clang::CodeGen::CodeGenVTables::EmitVTTDefinition().
|
inline |
Definition at line 436 of file VTableBuilder.h.
References Pointer.
|
inline |
Definition at line 437 of file VTableBuilder.h.
References Relative.
Referenced by ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenVTables::GenerateConstructionVTable(), performTypeAdjustment(), and UseRelativeLayout().