13#ifndef CLANG_LIB_CIR_CODEGEN_CIRGENVTABLES_H
14#define CLANG_LIB_CIR_CODEGEN_CIRGENVTABLES_H
16#include "mlir/IR/Types.h"
37 getVTableComponent(
const VTableLayout &layout,
unsigned componentIndex,
38 mlir::Attribute rtti,
unsigned &nextVTableThunkIndex,
39 unsigned vtableAddressPoint,
bool vtableHasLocalLinkage);
41 mlir::Type getVTableComponentType();
51 bool vtableHasLocalLinkage);
54 return *llvm::cast<clang::ItaniumVTableContext>(vtContext);
58 return *llvm::cast<clang::ItaniumVTableContext>(vtContext);
64 bool baseIsVirtual, cir::GlobalLinkageKind linkage,
65 VTableAddressPointsMapTy &addressPoints);
This class organizes the cross-function state that is used while generating CIR code.
cir::RecordType getVTableType(const clang::VTableLayout &layout)
Returns the type of a vtable with the given layout.
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.
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.
void emitThunks(GlobalDecl gd)
Emit the associated thunks for the given global decl.
void emitVTTDefinition(cir::GlobalOp vttOp, cir::GlobalLinkageKind linkage, const CXXRecordDecl *rd)
Emit the definition of the given vtable.
const clang::ItaniumVTableContext & getItaniumVTableContext() const
void generateClassData(const CXXRecordDecl *rd)
Generate all the class data required to be generated upon definition of a KeyFunction.
cir::GlobalOp getAddrOfVTT(const CXXRecordDecl *rd)
Get the address of the VTT for the given record decl.
clang::ItaniumVTableContext & getItaniumVTableContext()
Represents a C++ struct/union/class.
GlobalDecl - represents a global declaration.
llvm::DenseMap< BaseSubobject, AddressPointLocation > AddressPointsMapTy
The JSON file list parser is used to communicate input to InstallAPI.