struct VPtrInfo

Declaration

struct VPtrInfo { /* full declaration omitted */ };

Description

Holds information about the inheritance path to a virtual base or function table pointer. A record may contain as many vfptrs or vbptrs as there are base subobjects.

Declared at: clang/include/clang/AST/VTableBuilder.h:446

Member Variables

public const clang::CXXRecordDecl* ObjectWithVPtr
This is the most derived class that has this vptr at offset zero. When single inheritance is used, this is always the most derived class. If multiple inheritance is used, it may be any direct or indirect base.
public const clang::CXXRecordDecl* IntroducingObject
This is the class that introduced the vptr by declaring new virtual methods or virtual bases.
public clang::CharUnits NonVirtualOffset
IntroducingObject is at this offset from its containing complete object or virtual base.
public clang::VPtrInfo::BasePath MangledPath
The bases from the inheritance path that got used to mangle the vbtable name. This is not really a full path like a CXXBasePath. It holds the subset of records that need to be mangled into the vbtable symbol name in order to get a unique name.
public const clang::CXXRecordDecl* NextBaseToMangle
The next base to push onto the mangled path if this path is ambiguous in a derived class. If it's null, then it's already been pushed onto the path.
public clang::VPtrInfo::BasePath ContainingVBases
The set of possibly indirect vbases that contain this vbtable. When a derived class indirectly inherits from the same vbase twice, we only keep vtables and their paths from the first instance.
public clang::VPtrInfo::BasePath PathToIntroducingObject
This holds the base classes path from the complete type to the first base with the given vfptr offset, in the base-to-derived order. Only used for vftables.
public clang::CharUnits FullOffsetInMDC
Static offset from the top of the most derived class to this vfptr, including any virtual base offset. Only used for vftables.

Method Overview

Methods

VPtrInfo(const clang::CXXRecordDecl* RD)

Declared at: clang/include/clang/AST/VTableBuilder.h:449

Parameters

const clang::CXXRecordDecl* RD

const clang::CXXRecordDecl* getVBaseWithVPtr()
    const

Description

The vptr is stored inside the non-virtual component of this virtual base.

Declared at: clang/include/clang/AST/VTableBuilder.h:490