clang 22.0.0git
Public Member Functions | List of all members
clang::CIRGen::CIRGenVTables Class Reference

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenVTables.h"

Public Member Functions

 CIRGenVTables (CIRGenModule &cgm)
 
void createVTableInitializer (cir::GlobalOp &vtable, const clang::VTableLayout &layout, mlir::Attribute rtti, bool vtableHasLocalLinkage)
 Add vtable components for the given vtable layout to the given global initializer.
 
clang::ItaniumVTableContextgetItaniumVTableContext ()
 
const clang::ItaniumVTableContextgetItaniumVTableContext () const
 
cir::GlobalOp generateConstructionVTable (const CXXRecordDecl *rd, const BaseSubobject &base, bool baseIsVirtual, cir::GlobalLinkageKind linkage, VTableAddressPointsMapTy &addressPoints)
 Generate a construction vtable for the given base subobject.
 
cir::GlobalOp getAddrOfVTT (const CXXRecordDecl *rd)
 Get the address of the VTT for the given record decl.
 
void emitVTTDefinition (cir::GlobalOp vttOp, cir::GlobalLinkageKind linkage, const CXXRecordDecl *rd)
 Emit the definition of the given vtable.
 
void emitThunks (GlobalDecl gd)
 Emit the associated thunks for the given global decl.
 
void generateClassData (const CXXRecordDecl *rd)
 Generate all the class data required to be generated upon definition of a KeyFunction.
 
cir::RecordType getVTableType (const clang::VTableLayout &layout)
 Returns the type of a vtable with the given layout.
 

Detailed Description

Definition at line 28 of file CIRGenVTables.h.

Constructor & Destructor Documentation

◆ CIRGenVTables()

CIRGenVTables::CIRGenVTables ( CIRGenModule cgm)

Definition at line 26 of file CIRGenVTables.cpp.

Member Function Documentation

◆ createVTableInitializer()

void CIRGenVTables::createVTableInitializer ( cir::GlobalOp &  vtable,
const clang::VTableLayout layout,
mlir::Attribute  rtti,
bool  vtableHasLocalLinkage 
)

◆ emitThunks()

void CIRGenVTables::emitThunks ( GlobalDecl  gd)

◆ emitVTTDefinition()

void CIRGenVTables::emitVTTDefinition ( cir::GlobalOp  vttOp,
cir::GlobalLinkageKind  linkage,
const CXXRecordDecl rd 
)

◆ generateClassData()

void CIRGenVTables::generateClassData ( const CXXRecordDecl rd)

Generate all the class data required to be generated upon definition of a KeyFunction.

This includes the vtable, the RTTI data structure (if RTTI is enabled) and the VTT (if the class has virtual bases).

Definition at line 60 of file CIRGenVTables.cpp.

References clang::CIRGen::CIRGenCXXABI::emitVirtualInheritanceTables(), clang::CIRGen::CIRGenCXXABI::emitVTableDefinitions(), cir::MissingFeatures::generateDebugInfo(), clang::CIRGen::CIRGenModule::getCXXABI(), and clang::CXXRecordDecl::getNumVBases().

Referenced by clang::CIRGen::CIRGenModule::emitVTable().

◆ generateConstructionVTable()

cir::GlobalOp CIRGenVTables::generateConstructionVTable ( const CXXRecordDecl rd,
const BaseSubobject base,
bool  baseIsVirtual,
cir::GlobalLinkageKind  linkage,
VTableAddressPointsMapTy &  addressPoints 
)

◆ getAddrOfVTT()

cir::GlobalOp CIRGenVTables::getAddrOfVTT ( const CXXRecordDecl rd)

◆ getItaniumVTableContext() [1/2]

clang::ItaniumVTableContext & clang::CIRGen::CIRGenVTables::getItaniumVTableContext ( )
inline

◆ getItaniumVTableContext() [2/2]

const clang::ItaniumVTableContext & clang::CIRGen::CIRGenVTables::getItaniumVTableContext ( ) const
inline

Definition at line 57 of file CIRGenVTables.h.

◆ getVTableType()

cir::RecordType CIRGenVTables::getVTableType ( const clang::VTableLayout layout)

Returns the type of a vtable with the given layout.

Normally a struct of arrays of pointers, with one struct element for each vtable in the vtable group.

Definition at line 39 of file CIRGenVTables.cpp.

References clang::CIRGen::CIRGenBuilderTy::getAnonRecordTy(), clang::CIRGen::CIRGenModule::getBuilder(), clang::VTableLayout::getNumVTables(), and clang::VTableLayout::getVTableSize().

Referenced by generateConstructionVTable().


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