clang 8.0.0

Public Types | Public Member Functions | Static Public Member Functions | List of all members
clang::VTableComponent Class Reference

Represents a single component in a vtable. More...

`#include "clang/AST/VTableBuilder.h"`

## Public Types
enum | Kind { CK_VCallOffset, CK_VBaseOffset, CK_OffsetToTop, CK_RTTI, CK_FunctionPointer, CK_CompleteDtorPointer, CK_DeletingDtorPointer, CK_UnusedFunctionPointer }

## Public Member Functions
| VTableComponent ()=default
Kind | getKind () const
| Get the kind of this vtable component. More...
CharUnits | getVCallOffset () const
CharUnits | getVBaseOffset () const
CharUnits | getOffsetToTop () const
const CXXRecordDecl * | getRTTIDecl () const
const CXXMethodDecl * | getFunctionDecl () const
const CXXDestructorDecl * | getDestructorDecl () const
const CXXMethodDecl * | getUnusedFunctionDecl () const
bool | isDestructorKind () const
bool | isUsedFunctionPointerKind () const
bool | isFunctionPointerKind () const
bool | isRTTIKind () const
GlobalDecl | getGlobalDecl () const

## Static Public Member Functions
static VTableComponent | MakeVCallOffset (CharUnits Offset)
static VTableComponent | MakeVBaseOffset (CharUnits Offset)
static VTableComponent | MakeOffsetToTop (CharUnits Offset)
static VTableComponent | MakeRTTI (const CXXRecordDecl *RD)
static VTableComponent | MakeFunction (const CXXMethodDecl *MD)
static VTableComponent | MakeCompleteDtor (const CXXDestructorDecl *DD)
static VTableComponent | MakeDeletingDtor (const CXXDestructorDecl *DD)
static VTableComponent | MakeUnusedFunction (const CXXMethodDecl *MD)

## Detailed Description

Represents a single component in a vtable.

Definition at line 30 of file VTableBuilder.h.

## Member Enumeration Documentation

## ◆ Kind

enum clang::VTableComponent::Kind

Enumerator
CK_VCallOffset |
CK_VBaseOffset |
CK_OffsetToTop |
CK_RTTI |
CK_FunctionPointer |
CK_CompleteDtorPointer | A pointer to the complete destructor.
CK_DeletingDtorPointer | A pointer to the deleting destructor.
CK_UnusedFunctionPointer | An entry that is never used. In some cases, a vtable function pointer will end up never being called. Such vtable function pointers are represented as a CK_UnusedFunctionPointer.

Definition at line 32 of file VTableBuilder.h.

## Constructor & Destructor Documentation

## ◆ VTableComponent()

clang::VTableComponent::VTableComponent | ( |  | ) |
| default

Referenced by getGlobalDecl(), MakeCompleteDtor(), MakeDeletingDtor(), MakeFunction(), MakeOffsetToTop(), MakeRTTI(), MakeUnusedFunction(), MakeVBaseOffset(), and MakeVCallOffset().

## Member Function Documentation

## ◆ getDestructorDecl()

const CXXDestructorDecl* clang::VTableComponent::getDestructorDecl | ( |  | ) | const
| inline

Definition at line 131 of file VTableBuilder.h.

References isDestructorKind().

Referenced by getFunctionDecl().

## ◆ getFunctionDecl()

const CXXMethodDecl* clang::VTableComponent::getFunctionDecl | ( |  | ) | const
| inline

Definition at line 124 of file VTableBuilder.h.

References getDestructorDecl(), isDestructorKind(), and isFunctionPointerKind().

Referenced by getGlobalDecl().

## ◆ getGlobalDecl()

GlobalDecl clang::VTableComponent::getGlobalDecl | ( |  | ) | const
| inline

Definition at line 153 of file VTableBuilder.h.

References CK_CompleteDtorPointer, CK_DeletingDtorPointer, CK_FunctionPointer, CK_OffsetToTop, CK_RTTI, CK_UnusedFunctionPointer, CK_VBaseOffset, CK_VCallOffset, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CharUnits::fromQuantity(), getFunctionDecl(), getKind(), clang::CharUnits::getQuantity(), isDestructorKind(), isFunctionPointerKind(), isRTTIKind(), isUsedFunctionPointerKind(), Offset, and VTableComponent().

## ◆ getKind()

Kind clang::VTableComponent::getKind | ( |  | ) | const
| inline

Get the kind of this vtable component.

Definition at line 97 of file VTableBuilder.h.

Referenced by getGlobalDecl(), getOffsetToTop(), getUnusedFunctionDecl(), getVBaseOffset(), getVCallOffset(), isDestructorKind(), isFunctionPointerKind(), isRTTIKind(), and isUsedFunctionPointerKind().

## ◆ getOffsetToTop()

CharUnits clang::VTableComponent::getOffsetToTop | ( |  | ) | const
| inline

Definition at line 113 of file VTableBuilder.h.

References CK_OffsetToTop, and getKind().

## ◆ getRTTIDecl()

const CXXRecordDecl* clang::VTableComponent::getRTTIDecl | ( |  | ) | const
| inline

Definition at line 119 of file VTableBuilder.h.

References isRTTIKind().

## ◆ getUnusedFunctionDecl()

const CXXMethodDecl* clang::VTableComponent::getUnusedFunctionDecl | ( |  | ) | const
| inline

Definition at line 136 of file VTableBuilder.h.

References CK_UnusedFunctionPointer, and getKind().

## ◆ getVBaseOffset()

CharUnits clang::VTableComponent::getVBaseOffset | ( |  | ) | const
| inline

Definition at line 107 of file VTableBuilder.h.

References CK_VBaseOffset, and getKind().

## ◆ getVCallOffset()

CharUnits clang::VTableComponent::getVCallOffset | ( |  | ) | const
| inline

Definition at line 101 of file VTableBuilder.h.

References CK_VCallOffset, and getKind().

## ◆ isDestructorKind()

bool clang::VTableComponent::isDestructorKind | ( |  | ) | const
| inline

Definition at line 141 of file VTableBuilder.h.

References getKind(), and isDestructorKind().

Referenced by getDestructorDecl(), getFunctionDecl(), getGlobalDecl(), and isDestructorKind().

## ◆ isFunctionPointerKind()

bool clang::VTableComponent::isFunctionPointerKind | ( |  | ) | const
| inline

Definition at line 147 of file VTableBuilder.h.

References getKind().

Referenced by getFunctionDecl(), and getGlobalDecl().

## ◆ isRTTIKind()

bool clang::VTableComponent::isRTTIKind | ( |  | ) | const
| inline

Definition at line 151 of file VTableBuilder.h.

References getKind(), and isRTTIKind().

Referenced by getGlobalDecl(), getRTTIDecl(), and isRTTIKind().

## ◆ isUsedFunctionPointerKind()

bool clang::VTableComponent::isUsedFunctionPointerKind | ( |  | ) | const
| inline

Definition at line 143 of file VTableBuilder.h.

References getKind().

Referenced by getGlobalDecl().

## ◆ MakeCompleteDtor()

static VTableComponent clang::VTableComponent::MakeCompleteDtor | ( | const CXXDestructorDecl * | DD | ) |
| inline static

Definition at line 79 of file VTableBuilder.h.

References CK_CompleteDtorPointer, and VTableComponent().

## ◆ MakeDeletingDtor()

static VTableComponent clang::VTableComponent::MakeDeletingDtor | ( | const CXXDestructorDecl * | DD | ) |
| inline static

Definition at line 84 of file VTableBuilder.h.

References CK_DeletingDtorPointer, and VTableComponent().

## ◆ MakeFunction()

static VTableComponent clang::VTableComponent::MakeFunction | ( | const CXXMethodDecl * | MD | ) |
| inline static

Definition at line 71 of file VTableBuilder.h.

References CK_FunctionPointer, and VTableComponent().

## ◆ MakeOffsetToTop()

static VTableComponent clang::VTableComponent::MakeOffsetToTop | ( | CharUnits | Offset | ) |
| inline static

Definition at line 63 of file VTableBuilder.h.

References CK_OffsetToTop, and VTableComponent().

## ◆ MakeRTTI()

static VTableComponent clang::VTableComponent::MakeRTTI | ( | const CXXRecordDecl * | RD | ) |
| inline static

Definition at line 67 of file VTableBuilder.h.

References CK_RTTI, and VTableComponent().

## ◆ MakeUnusedFunction()

static VTableComponent clang::VTableComponent::MakeUnusedFunction | ( | const CXXMethodDecl * | MD | ) |
| inline static

Definition at line 89 of file VTableBuilder.h.

References CK_UnusedFunctionPointer, and VTableComponent().

## ◆ MakeVBaseOffset()

static VTableComponent clang::VTableComponent::MakeVBaseOffset | ( | CharUnits | Offset | ) |
| inline static

Definition at line 59 of file VTableBuilder.h.

References CK_VBaseOffset, and VTableComponent().

## ◆ MakeVCallOffset()

static VTableComponent clang::VTableComponent::MakeVCallOffset | ( | CharUnits | Offset | ) |
| inline static

Definition at line 55 of file VTableBuilder.h.

References CK_VCallOffset, and VTableComponent().

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

- include/clang/AST/VTableBuilder.h