clang API Documentation

Functions
CGClass.cpp File Reference
#include "CGBlocks.h"
#include "CGCXXABI.h"
#include "CGDebugInfo.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/EvaluatedExprVisitor.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtCXX.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/Frontend/CodeGenOptions.h"
Include dependency graph for CGClass.cpp:

Go to the source code of this file.

Functions

static CharUnits ComputeNonVirtualBaseClassOffset (ASTContext &Context, const CXXRecordDecl *DerivedClass, CastExpr::path_const_iterator Start, CastExpr::path_const_iterator End)
static llvm::ValueApplyNonVirtualAndVirtualOffset (CodeGenFunction &CGF, llvm::Value *ptr, CharUnits nonVirtualOffset, llvm::Value *virtualOffset)
static bool BaseInitializerUsesThis (ASTContext &C, const Expr *Init)
static void EmitBaseInitializer (CodeGenFunction &CGF, const CXXRecordDecl *ClassDecl, CXXCtorInitializer *BaseInit, CXXCtorType CtorType)
static void EmitAggMemberInitializer (CodeGenFunction &CGF, LValue LHS, Expr *Init, llvm::Value *ArrayIndexVar, QualType T, ArrayRef< VarDecl * > ArrayIndexes, unsigned Index)
static void EmitMemberInitializer (CodeGenFunction &CGF, const CXXRecordDecl *ClassDecl, CXXCtorInitializer *MemberInit, const CXXConstructorDecl *Constructor, FunctionArgList &Args)
static bool IsConstructorDelegationValid (const CXXConstructorDecl *Ctor)
static bool FieldHasTrivialDestructorBody (ASTContext &Context, const FieldDecl *Field)
static bool HasTrivialDestructorBody (ASTContext &Context, const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl)
static bool CanSkipVTablePointerInitialization (ASTContext &Context, const CXXDestructorDecl *Dtor)
static const ExprskipNoOpCastsAndParens (const Expr *E)

Function Documentation

static llvm::Value* ApplyNonVirtualAndVirtualOffset ( CodeGenFunction CGF,
llvm::Value ptr,
CharUnits  nonVirtualOffset,
llvm::Value virtualOffset 
) [static]
static bool BaseInitializerUsesThis ( ASTContext C,
const Expr Init 
) [static]

Definition at line 388 of file CGClass.cpp.

Referenced by EmitBaseInitializer().

static bool CanSkipVTablePointerInitialization ( ASTContext Context,
const CXXDestructorDecl Dtor 
) [static]

CanSkipVTablePointerInitialization - Check whether we need to initialize any vtable pointers before calling this destructor.

Definition at line 1336 of file CGClass.cpp.

References FieldHasTrivialDestructorBody(), clang::CXXMethodDecl::getParent(), and clang::FunctionDecl::hasTrivialBody().

Referenced by clang::CodeGen::CodeGenFunction::EmitDestructorBody().

static void EmitAggMemberInitializer ( CodeGenFunction CGF,
LValue  LHS,
Expr Init,
llvm::Value ArrayIndexVar,
QualType  T,
ArrayRef< VarDecl * >  ArrayIndexes,
unsigned  Index 
) [static]
static void EmitBaseInitializer ( CodeGenFunction CGF,
const CXXRecordDecl ClassDecl,
CXXCtorInitializer BaseInit,
CXXCtorType  CtorType 
) [static]
static void EmitMemberInitializer ( CodeGenFunction CGF,
const CXXRecordDecl ClassDecl,
CXXCtorInitializer MemberInit,
const CXXConstructorDecl Constructor,
FunctionArgList Args 
) [static]
static bool FieldHasTrivialDestructorBody ( ASTContext Context,
const FieldDecl Field 
) [static]
static bool HasTrivialDestructorBody ( ASTContext Context,
const CXXRecordDecl BaseClassDecl,
const CXXRecordDecl MostDerivedClassDecl 
) [static]
static bool IsConstructorDelegationValid ( const CXXConstructorDecl Ctor) [static]

Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e. emitting the complete constructor as a simple call to the base constructor.

Definition at line 661 of file CGClass.cpp.

References clang::Type::getAs(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), and clang::CXXConstructorDecl::isDelegatingConstructor().

Referenced by clang::CodeGen::CodeGenFunction::EmitConstructorBody().

static const Expr* skipNoOpCastsAndParens ( const Expr E) [static]