clang API Documentation

Functions
RecordLayoutBuilder.cpp File Reference
#include "clang/AST/RecordLayout.h"
#include "clang/AST/ASTContext.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/Basic/TargetInfo.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MathExtras.h"
Include dependency graph for RecordLayoutBuilder.cpp:

Go to the source code of this file.

Functions

static uint64_t roundUpSizeToCharAlignment (uint64_t Size, const ASTContext &Context)
static unsigned getPaddingDiagFromTagKind (TagTypeKind Tag)
 Get diagnostic select index for tag kind for field padding diagnostic message. WARNING: Indexes apply to particular diagnostics only!
static const CXXMethodDeclcomputeKeyFunction (ASTContext &Context, const CXXRecordDecl *RD)
static bool mustSkipTailPadding (TargetCXXABI ABI, const CXXRecordDecl *RD)
static bool isMsLayout (const RecordDecl *D)
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 PrintIndentNoOffset (raw_ostream &OS, unsigned IndentLevel)
static void DumpCXXRecordLayout (raw_ostream &OS, const CXXRecordDecl *RD, const ASTContext &C, CharUnits Offset, unsigned IndentLevel, const char *Description, bool IncludeVirtualBases)

Function Documentation

static const CXXMethodDecl* computeKeyFunction ( ASTContext Context,
const CXXRecordDecl RD 
) [static]
static void DumpCXXRecordLayout ( raw_ostream &  OS,
const CXXRecordDecl RD,
const ASTContext C,
CharUnits  Offset,
unsigned  IndentLevel,
const char *  Description,
bool  IncludeVirtualBases 
) [static]
static uint64_t getFieldOffset ( const ASTContext C,
const FieldDecl FD 
) [static]

Get diagnostic select index for tag kind for field padding diagnostic message. WARNING: Indexes apply to particular diagnostics only!

Returns:
diagnostic select index.

Definition at line 1889 of file RecordLayoutBuilder.cpp.

References clang::TTK_Class, clang::TTK_Interface, and clang::TTK_Struct.

static bool isMsLayout ( const RecordDecl D) [static]
static bool mustSkipTailPadding ( TargetCXXABI  ABI,
const CXXRecordDecl RD 
) [static]
static void PrintIndentNoOffset ( raw_ostream &  OS,
unsigned  IndentLevel 
) [static]

Definition at line 2998 of file RecordLayoutBuilder.cpp.

Referenced by DumpCXXRecordLayout().

static void PrintOffset ( raw_ostream &  OS,
CharUnits  Offset,
unsigned  IndentLevel 
) [static]

Definition at line 2992 of file RecordLayoutBuilder.cpp.

References clang::CharUnits::getQuantity().

Referenced by DumpCXXRecordLayout().

static bool RequiresVtordisp ( const llvm::SmallPtrSetImpl< const CXXRecordDecl * > &  BasesWithOverriddenMethods,
const CXXRecordDecl RD 
) [static]

Definition at line 2685 of file RecordLayoutBuilder.cpp.

References clang::CXXRecordDecl::bases().

static uint64_t roundUpSizeToCharAlignment ( uint64_t  Size,
const ASTContext Context 
) [static]