clang 19.0.0git
Macros | Functions
VTableBuilder.cpp File Reference
#include "clang/AST/VTableBuilder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cstdio>

Go to the source code of this file.

Macros

#define DUMP_OVERRIDERS   0
 

Functions

static VTableLayout::AddressPointsIndexMapTy MakeAddressPointIndices (const VTableLayout::AddressPointsMapTy &addressPoints, unsigned numVTables)
 
static std::unique_ptr< VTableLayoutCreateVTableLayout (const ItaniumVTableBuilder &Builder)
 
static void GroupNewVirtualOverloads (const CXXRecordDecl *RD, SmallVector< const CXXMethodDecl *, 10 > &VirtualMethods)
 
static bool isDirectVBase (const CXXRecordDecl *Base, const CXXRecordDecl *RD)
 
static void PrintBasePath (const VPtrInfo::BasePath &Path, raw_ostream &Out)
 
static void dumpMicrosoftThunkAdjustment (const ThunkInfo &TI, raw_ostream &Out, bool ContinueFirstLine)
 
static bool setsIntersect (const llvm::SmallPtrSet< const CXXRecordDecl *, 4 > &A, ArrayRef< const CXXRecordDecl * > B)
 
static bool rebucketPaths (VPtrInfoVector &Paths)
 
static bool extendPath (VPtrInfo &P)
 
static void findPathsToSubobject (ASTContext &Context, const ASTRecordLayout &MostDerivedLayout, const CXXRecordDecl *RD, CharUnits Offset, BaseSubobject IntroducingObject, FullPathTy &FullPath, std::list< FullPathTy > &Paths)
 
static void removeRedundantPaths (std::list< FullPathTy > &FullPaths)
 
static CharUnits getOffsetOfFullPath (ASTContext &Context, const CXXRecordDecl *RD, const FullPathTy &FullPath)
 
static const FullPathTy * selectBestPath (ASTContext &Context, const CXXRecordDecl *RD, const VPtrInfo &Info, std::list< FullPathTy > &FullPaths)
 
static void computeFullPathsForVFTables (ASTContext &Context, const CXXRecordDecl *RD, VPtrInfoVector &Paths)
 
static bool vfptrIsEarlierInMDC (const ASTRecordLayout &Layout, const MethodVFTableLocation &LHS, const MethodVFTableLocation &RHS)
 

Macro Definition Documentation

◆ DUMP_OVERRIDERS

#define DUMP_OVERRIDERS   0

Definition at line 29 of file VTableBuilder.cpp.

Function Documentation

◆ computeFullPathsForVFTables()

static void computeFullPathsForVFTables ( ASTContext Context,
const CXXRecordDecl RD,
VPtrInfoVector Paths 
)
static

◆ CreateVTableLayout()

static std::unique_ptr< VTableLayout > CreateVTableLayout ( const ItaniumVTableBuilder &  Builder)
static

◆ dumpMicrosoftThunkAdjustment()

static void dumpMicrosoftThunkAdjustment ( const ThunkInfo TI,
raw_ostream &  Out,
bool  ContinueFirstLine 
)
static

◆ extendPath()

static bool extendPath ( VPtrInfo P)
static

Definition at line 3375 of file VTableBuilder.cpp.

References P.

Referenced by rebucketPaths().

◆ findPathsToSubobject()

static void findPathsToSubobject ( ASTContext Context,
const ASTRecordLayout MostDerivedLayout,
const CXXRecordDecl RD,
CharUnits  Offset,
BaseSubobject  IntroducingObject,
FullPathTy &  FullPath,
std::list< FullPathTy > &  Paths 
)
static

◆ getOffsetOfFullPath()

static CharUnits getOffsetOfFullPath ( ASTContext Context,
const CXXRecordDecl RD,
const FullPathTy &  FullPath 
)
static

◆ GroupNewVirtualOverloads()

static void GroupNewVirtualOverloads ( const CXXRecordDecl RD,
SmallVector< const CXXMethodDecl *, 10 > &  VirtualMethods 
)
static

◆ isDirectVBase()

static bool isDirectVBase ( const CXXRecordDecl Base,
const CXXRecordDecl RD 
)
static

Definition at line 2937 of file VTableBuilder.cpp.

References clang::CXXRecordDecl::bases().

◆ MakeAddressPointIndices()

static VTableLayout::AddressPointsIndexMapTy MakeAddressPointIndices ( const VTableLayout::AddressPointsMapTy addressPoints,
unsigned  numVTables 
)
static

Definition at line 2216 of file VTableBuilder.cpp.

◆ PrintBasePath()

static void PrintBasePath ( const VPtrInfo::BasePath Path,
raw_ostream &  Out 
)
static

Definition at line 3104 of file VTableBuilder.cpp.

◆ rebucketPaths()

static bool rebucketPaths ( VPtrInfoVector Paths)
static

Definition at line 3384 of file VTableBuilder.cpp.

References extendPath(), and clang::VPtrInfo::MangledPath.

◆ removeRedundantPaths()

static void removeRedundantPaths ( std::list< FullPathTy > &  FullPaths)
static

Definition at line 3451 of file VTableBuilder.cpp.

Referenced by computeFullPathsForVFTables().

◆ selectBestPath()

static const FullPathTy * selectBestPath ( ASTContext Context,
const CXXRecordDecl RD,
const VPtrInfo Info,
std::list< FullPathTy > &  FullPaths 
)
static

◆ setsIntersect()

static bool setsIntersect ( const llvm::SmallPtrSet< const CXXRecordDecl *, 4 > &  A,
ArrayRef< const CXXRecordDecl * >  B 
)
static

Definition at line 3266 of file VTableBuilder.cpp.

◆ vfptrIsEarlierInMDC()

static bool vfptrIsEarlierInMDC ( const ASTRecordLayout Layout,
const MethodVFTableLocation LHS,
const MethodVFTableLocation RHS 
)
static