clang API Documentation
#include "clang/AST/VTableBuilder.h"#include "clang/AST/ASTContext.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/RecordLayout.h"#include "clang/Basic/TargetInfo.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.
Classes | |
| struct | InitialOverriddenDefinitionCollector |
Defines | |
| #define | DUMP_OVERRIDERS 0 |
Functions | |
| static VTableLayout * | CreateVTableLayout (const ItaniumVTableBuilder &Builder) |
| static bool | BaseInSet (const CXXBaseSpecifier *Specifier, CXXBasePath &Path, void *BasesSet) |
| 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 bool | findPathForVPtr (ASTContext &Context, const ASTRecordLayout &MostDerivedLayout, const CXXRecordDecl *RD, CharUnits Offset, llvm::SmallPtrSetImpl< const CXXRecordDecl * > &VBasesSeen, VPtrInfo::BasePath &FullPath, VPtrInfo *Info) |
| static void | computeFullPathsForVFTables (ASTContext &Context, const CXXRecordDecl *RD, VPtrInfoVector &Paths) |
| #define DUMP_OVERRIDERS 0 |
Definition at line 27 of file VTableBuilder.cpp.
| static bool BaseInSet | ( | const CXXBaseSpecifier * | Specifier, |
| CXXBasePath & | Path, | ||
| void * | BasesSet | ||
| ) | [static] |
Definition at line 2643 of file VTableBuilder.cpp.
References clang::Type::getAsCXXRecordDecl(), and clang::CXXBaseSpecifier::getType().
| static void computeFullPathsForVFTables | ( | ASTContext & | Context, |
| const CXXRecordDecl * | RD, | ||
| VPtrInfoVector & | Paths | ||
| ) | [static] |
Definition at line 3475 of file VTableBuilder.cpp.
References findPathForVPtr(), clang::ASTContext::getASTRecordLayout(), and clang::CharUnits::Zero().
| static VTableLayout* CreateVTableLayout | ( | const ItaniumVTableBuilder & | Builder | ) | [static] |
Definition at line 2315 of file VTableBuilder.cpp.
Referenced by clang::ItaniumVTableContext::createConstructionVTableLayout().
| static void dumpMicrosoftThunkAdjustment | ( | const ThunkInfo & | TI, |
| raw_ostream & | Out, | ||
| bool | ContinueFirstLine | ||
| ) | [static] |
Definition at line 3120 of file VTableBuilder.cpp.
References clang::QualType::getAsString(), clang::QualType::getCanonicalType(), clang::FunctionDecl::getReturnType(), clang::ReturnAdjustment::isEmpty(), clang::ThisAdjustment::VirtualAdjustment::isEmpty(), clang::ThisAdjustment::isEmpty(), clang::ThunkInfo::Method, clang::ReturnAdjustment::VirtualAdjustment::Microsoft, clang::ThisAdjustment::VirtualAdjustment::Microsoft, clang::ReturnAdjustment::NonVirtual, clang::ThisAdjustment::NonVirtual, clang::ThunkInfo::Return, clang::ThunkInfo::This, clang::ReturnAdjustment::VirtualAdjustment::VBIndex, clang::ThisAdjustment::VirtualAdjustment::VBOffsetOffset, clang::ReturnAdjustment::VirtualAdjustment::VBPtrOffset, clang::ThisAdjustment::VirtualAdjustment::VBPtrOffset, clang::ReturnAdjustment::Virtual, clang::ThisAdjustment::Virtual, and clang::ThisAdjustment::VirtualAdjustment::VtordispOffset.
| static bool extendPath | ( | VPtrInfo * | P | ) | [static] |
Definition at line 3389 of file VTableBuilder.cpp.
References clang::VPtrInfo::MangledPath, and clang::VPtrInfo::NextBaseToMangle.
Referenced by rebucketPaths().
| static bool findPathForVPtr | ( | ASTContext & | Context, |
| const ASTRecordLayout & | MostDerivedLayout, | ||
| const CXXRecordDecl * | RD, | ||
| CharUnits | Offset, | ||
| llvm::SmallPtrSetImpl< const CXXRecordDecl * > & | VBasesSeen, | ||
| VPtrInfo::BasePath & | FullPath, | ||
| VPtrInfo * | Info | ||
| ) | [static] |
Definition at line 3438 of file VTableBuilder.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::VPtrInfo::BaseWithVPtr, clang::VPtrInfo::FullOffsetInMDC, clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getVBaseClassOffset(), and clang::VPtrInfo::PathToBaseWithVPtr.
Referenced by computeFullPathsForVFTables().
| static void GroupNewVirtualOverloads | ( | const CXXRecordDecl * | RD, |
| SmallVector< const CXXMethodDecl *, 10 > & | VirtualMethods | ||
| ) | [static] |
Definition at line 2919 of file VTableBuilder.cpp.
References clang::NamedDecl::getDeclName(), clang::CXXMethodDecl::isVirtual(), and clang::CXXRecordDecl::methods().
| static bool isDirectVBase | ( | const CXXRecordDecl * | Base, |
| const CXXRecordDecl * | RD | ||
| ) | [static] |
Definition at line 2946 of file VTableBuilder.cpp.
References clang::CodeGen::Base, and clang::CXXRecordDecl::bases().
| static void PrintBasePath | ( | const VPtrInfo::BasePath & | Path, |
| raw_ostream & | Out | ||
| ) | [static] |
Definition at line 3111 of file VTableBuilder.cpp.
| static bool rebucketPaths | ( | VPtrInfoVector & | Paths | ) | [static] |
Definition at line 3398 of file VTableBuilder.cpp.
References extendPath(), and clang::VPtrInfo::MangledPath.
| static bool setsIntersect | ( | const llvm::SmallPtrSet< const CXXRecordDecl *, 4 > & | A, |
| ArrayRef< const CXXRecordDecl * > | B | ||
| ) | [static] |
Definition at line 3279 of file VTableBuilder.cpp.