clang 20.0.0git
|
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MathExtras.h"
Go to the source code of this file.
Functions | |
static uint64_t | roundUpSizeToCharAlignment (uint64_t Size, const ASTContext &Context) |
static bool | isAIXLayout (const ASTContext &Context) |
static unsigned | getPaddingDiagFromTagKind (TagTypeKind Tag) |
Get diagnostic select index for tag kind for field padding diagnostic message. | |
static const CXXMethodDecl * | computeKeyFunction (ASTContext &Context, const CXXRecordDecl *RD) |
static bool | mustSkipTailPadding (TargetCXXABI ABI, const CXXRecordDecl *RD) |
Does the target C++ ABI require us to skip over the tail-padding of the given class (considering it as a base class) when allocating objects? | |
static bool | isMsLayout (const ASTContext &Context) |
static bool | recordUsesEBO (const RecordDecl *RD) |
static bool | RequiresVtordisp (const llvm::SmallPtrSetImpl< const CXXRecordDecl * > &BasesWithOverriddenMethods, const CXXRecordDecl *RD) |
static uint64_t | getFieldOffset (const ASTContext &C, const FieldDecl *FD) |
static void | PrintOffset (raw_ostream &OS, CharUnits Offset, unsigned IndentLevel) |
static void | PrintBitFieldOffset (raw_ostream &OS, CharUnits Offset, unsigned Begin, unsigned Width, unsigned IndentLevel) |
static void | PrintIndentNoOffset (raw_ostream &OS, unsigned IndentLevel) |
static void | DumpRecordLayout (raw_ostream &OS, const RecordDecl *RD, const ASTContext &C, CharUnits Offset, unsigned IndentLevel, const char *Description, bool PrintSizeInfo, bool IncludeVirtualBases) |
|
static |
Definition at line 2332 of file RecordLayoutBuilder.cpp.
References clang::TargetCXXABI::canKeyFunctionBeInline(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getLangOpts(), clang::ASTContext::getTargetInfo(), clang::CXXRecordDecl::getTemplateSpecializationKind(), clang::Decl::hasAttr(), clang::TargetInfo::hasPS4DLLImportExport(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isInlineSpecified(), clang::CXXRecordDecl::isPolymorphic(), clang::CXXRecordDecl::methods(), clang::TSK_ExplicitInstantiationDeclaration, clang::TSK_ExplicitInstantiationDefinition, and clang::TSK_ImplicitInstantiation.
Referenced by clang::ASTContext::getCurrentKeyFunction().
|
static |
Definition at line 3608 of file RecordLayoutBuilder.cpp.
References Begin, clang::C, DumpRecordLayout(), E, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::CharUnits::fromQuantity(), clang::ASTRecordLayout::getAlignment(), clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getDataSize(), clang::RecordType::getDecl(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getNonVirtualAlignment(), clang::ASTRecordLayout::getNonVirtualSize(), clang::ASTRecordLayout::getPreferredAlignment(), clang::ASTRecordLayout::getPreferredNVAlignment(), clang::ASTRecordLayout::getPrimaryBase(), clang::CharUnits::getQuantity(), clang::ASTRecordLayout::getSize(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::ASTRecordLayout::getVBaseOffsetsMap(), clang::ASTRecordLayout::getVBPtrOffset(), clang::ASTRecordLayout::hasOwnVBPtr(), clang::ASTRecordLayout::hasOwnVFPtr(), isMsLayout(), PrintBitFieldOffset(), PrintIndentNoOffset(), and PrintOffset().
Referenced by DumpRecordLayout().
|
static |
Definition at line 3477 of file RecordLayoutBuilder.cpp.
References clang::C, clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), and clang::FieldDecl::getParent().
Referenced by clang::interp::Pointer::toAPValue().
|
static |
Get diagnostic select index for tag kind for field padding diagnostic message.
WARNING: Indexes apply to particular diagnostics only!
Definition at line 2275 of file RecordLayoutBuilder.cpp.
References clang::Class, clang::Interface, and clang::Struct.
|
static |
Definition at line 1540 of file RecordLayoutBuilder.cpp.
References clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().
|
static |
Definition at line 2460 of file RecordLayoutBuilder.cpp.
References clang::ASTContext::getAuxTargetInfo(), clang::TargetInfo::getCXXABI(), clang::ASTContext::getLangOpts(), clang::ASTContext::getTargetInfo(), and clang::TargetCXXABI::isMicrosoft().
Referenced by clang::ASTContext::DumpRecordLayout(), DumpRecordLayout(), and clang::ASTContext::getASTRecordLayout().
|
static |
Does the target C++ ABI require us to skip over the tail-padding of the given class (considering it as a base class) when allocating objects?
Definition at line 2421 of file RecordLayoutBuilder.cpp.
References clang::TargetCXXABI::AlwaysUseTailPadding, clang::TargetCXXABI::getTailPaddingUseRules(), clang::CXXRecordDecl::isCXX11StandardLayout(), clang::CXXRecordDecl::isPOD(), clang::CXXRecordDecl::isTrivial(), clang::TargetCXXABI::UseTailPaddingUnlessPOD03, and clang::TargetCXXABI::UseTailPaddingUnlessPOD11.
Referenced by clang::ASTContext::getASTRecordLayout().
|
static |
Definition at line 3585 of file RecordLayoutBuilder.cpp.
References Begin.
Referenced by DumpRecordLayout().
|
static |
Definition at line 3603 of file RecordLayoutBuilder.cpp.
Referenced by DumpRecordLayout().
Definition at line 3579 of file RecordLayoutBuilder.cpp.
Referenced by DumpRecordLayout().
|
static |
Definition at line 2918 of file RecordLayoutBuilder.cpp.
References clang::Decl::getAttr(), and clang::Decl::hasAttr().
|
static |
Definition at line 3250 of file RecordLayoutBuilder.cpp.
References clang::CXXRecordDecl::bases(), and RequiresVtordisp().
Referenced by RequiresVtordisp().
|
static |
Definition at line 1468 of file RecordLayoutBuilder.cpp.
References clang::TargetInfo::getCharAlign(), and clang::ASTContext::getTargetInfo().