clang  6.0.0svn
Public Types | Public Member Functions | Public Attributes | List of all members
clang::VPtrInfo Struct Reference

Holds information about the inheritance path to a virtual base or function table pointer. More...

#include "clang/AST/VTableBuilder.h"

Collaboration diagram for clang::VPtrInfo:
Collaboration graph
[legend]

Public Types

typedef SmallVector< const CXXRecordDecl *, 1 > BasePath
 

Public Member Functions

 VPtrInfo (const CXXRecordDecl *RD)
 
const CXXRecordDeclgetVBaseWithVPtr () const
 The vptr is stored inside the non-virtual component of this virtual base. More...
 

Public Attributes

const CXXRecordDeclObjectWithVPtr
 This is the most derived class that has this vptr at offset zero. More...
 
const CXXRecordDeclIntroducingObject
 This is the class that introduced the vptr by declaring new virtual methods or virtual bases. More...
 
CharUnits NonVirtualOffset
 IntroducingObject is at this offset from its containing complete object or virtual base. More...
 
BasePath MangledPath
 The bases from the inheritance path that got used to mangle the vbtable name. More...
 
const CXXRecordDeclNextBaseToMangle
 The next base to push onto the mangled path if this path is ambiguous in a derived class. More...
 
BasePath ContainingVBases
 The set of possibly indirect vbases that contain this vbtable. More...
 
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. More...
 
CharUnits FullOffsetInMDC
 Static offset from the top of the most derived class to this vfptr, including any virtual base offset. More...
 

Detailed 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.

Definition at line 418 of file VTableBuilder.h.

Member Typedef Documentation

◆ BasePath

Definition at line 419 of file VTableBuilder.h.

Constructor & Destructor Documentation

◆ VPtrInfo()

clang::VPtrInfo::VPtrInfo ( const CXXRecordDecl RD)
inline

Definition at line 421 of file VTableBuilder.h.

Member Function Documentation

◆ getVBaseWithVPtr()

const CXXRecordDecl* clang::VPtrInfo::getVBaseWithVPtr ( ) const
inline

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

Definition at line 462 of file VTableBuilder.h.

Referenced by detectAmbiguousBases().

Member Data Documentation

◆ ContainingVBases

BasePath clang::VPtrInfo::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.

Definition at line 450 of file VTableBuilder.h.

◆ FullOffsetInMDC

CharUnits clang::VPtrInfo::FullOffsetInMDC

Static offset from the top of the most derived class to this vfptr, including any virtual base offset.

Only used for vftables.

Definition at line 459 of file VTableBuilder.h.

Referenced by detectAmbiguousBases().

◆ IntroducingObject

const CXXRecordDecl* clang::VPtrInfo::IntroducingObject

This is the class that introduced the vptr by declaring new virtual methods or virtual bases.

Definition at line 431 of file VTableBuilder.h.

◆ MangledPath

BasePath clang::VPtrInfo::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.

Definition at line 441 of file VTableBuilder.h.

Referenced by detectAmbiguousBases(), extendPath(), mangleVFTableName(), and rebucketPaths().

◆ NextBaseToMangle

const CXXRecordDecl* clang::VPtrInfo::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.

Definition at line 445 of file VTableBuilder.h.

Referenced by extendPath().

◆ NonVirtualOffset

CharUnits clang::VPtrInfo::NonVirtualOffset

IntroducingObject is at this offset from its containing complete object or virtual base.

Definition at line 435 of file VTableBuilder.h.

Referenced by detectAmbiguousBases().

◆ ObjectWithVPtr

const CXXRecordDecl* clang::VPtrInfo::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.

Definition at line 427 of file VTableBuilder.h.

◆ PathToIntroducingObject

BasePath clang::VPtrInfo::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.

Definition at line 455 of file VTableBuilder.h.


The documentation for this struct was generated from the following file: