clang  6.0.0svn
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 "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Transforms/Utils/SanitizerStats.h"
Include dependency graph for CGClass.cpp:

Go to the source code of this file.

Functions

static Address ApplyNonVirtualAndVirtualOffset (CodeGenFunction &CGF, Address addr, CharUnits nonVirtualOffset, llvm::Value *virtualOffset, const CXXRecordDecl *derivedClass, const CXXRecordDecl *nearestVBase)
 
static bool BaseInitializerUsesThis (ASTContext &C, const Expr *Init)
 
static void EmitBaseInitializer (CodeGenFunction &CGF, const CXXRecordDecl *ClassDecl, CXXCtorInitializer *BaseInit, CXXCtorType CtorType)
 
static bool isMemcpyEquivalentSpecialMember (const CXXMethodDecl *D)
 
static void EmitLValueForAnyFieldInitialization (CodeGenFunction &CGF, CXXCtorInitializer *MemberInit, LValue &LHS)
 
static void EmitMemberInitializer (CodeGenFunction &CGF, const CXXRecordDecl *ClassDecl, CXXCtorInitializer *MemberInit, const CXXConstructorDecl *Constructor, FunctionArgList &Args)
 
static bool isInitializerOfDynamicClass (const CXXCtorInitializer *BaseInit)
 
static bool FieldHasTrivialDestructorBody (ASTContext &Context, const FieldDecl *Field)
 
static bool HasTrivialDestructorBody (ASTContext &Context, const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl)
 
static bool CanSkipVTablePointerInitialization (CodeGenFunction &CGF, const CXXDestructorDecl *Dtor)
 CanSkipVTablePointerInitialization - Check whether we need to initialize any vtable pointers before calling this destructor. More...
 
static bool canEmitDelegateCallArgs (CodeGenFunction &CGF, const CXXConstructorDecl *Ctor, CXXCtorType Type, CallArgList &Args)
 
static const CXXRecordDeclLeastDerivedClassWithSameLayout (const CXXRecordDecl *RD)
 

Function Documentation

◆ ApplyNonVirtualAndVirtualOffset()

static Address ApplyNonVirtualAndVirtualOffset ( CodeGenFunction CGF,
Address  addr,
CharUnits  nonVirtualOffset,
llvm::Value virtualOffset,
const CXXRecordDecl derivedClass,
const CXXRecordDecl nearestVBase 
)
static

◆ BaseInitializerUsesThis()

static bool BaseInitializerUsesThis ( ASTContext C,
const Expr Init 
)
static

Definition at line 520 of file CGClass.cpp.

Referenced by EmitBaseInitializer().

◆ canEmitDelegateCallArgs()

static bool canEmitDelegateCallArgs ( CodeGenFunction CGF,
const CXXConstructorDecl Ctor,
CXXCtorType  Type,
CallArgList Args 
)
static

◆ CanSkipVTablePointerInitialization()

static bool CanSkipVTablePointerInitialization ( CodeGenFunction CGF,
const CXXDestructorDecl Dtor 
)
static

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

Definition at line 1373 of file CGClass.cpp.

References FieldHasTrivialDestructorBody(), clang::RecordDecl::fields(), clang::CodeGen::CodeGenFunction::getContext(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::hasTrivialBody(), and clang::CXXRecordDecl::isDynamicClass().

◆ EmitBaseInitializer()

static void EmitBaseInitializer ( CodeGenFunction CGF,
const CXXRecordDecl ClassDecl,
CXXCtorInitializer BaseInit,
CXXCtorType  CtorType 
)
static

◆ EmitLValueForAnyFieldInitialization()

static void EmitLValueForAnyFieldInitialization ( CodeGenFunction CGF,
CXXCtorInitializer MemberInit,
LValue LHS 
)
static

◆ EmitMemberInitializer()

static void EmitMemberInitializer ( CodeGenFunction CGF,
const CXXRecordDecl ClassDecl,
CXXCtorInitializer MemberInit,
const CXXConstructorDecl Constructor,
FunctionArgList Args 
)
static

Definition at line 602 of file CGClass.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), EmitLValueForAnyFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CXXCtorInitializer::getAnyMember(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getBaseElementType(), clang::CXXConstructExpr::getConstructor(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXCtorInitializer::getInit(), clang::CXXCtorInitializer::getSourceLocation(), clang::CodeGen::CGCXXABI::getSrcArgforCopyCtor(), clang::ASTContext::getTypeDeclType(), clang::CXXCtorInitializer::isAnyMemberInitializer(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::QualType::isDestructedType(), isMemcpyEquivalentSpecialMember(), clang::QualType::isPODType(), clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CodeGenFunction::LoadCXXThis(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::CodeGen::CodeGenFunction::needsEHCleanup(), and clang::CodeGen::CodeGenFunction::pushEHDestroy().

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

◆ FieldHasTrivialDestructorBody()

static bool FieldHasTrivialDestructorBody ( ASTContext Context,
const FieldDecl Field 
)
static

◆ HasTrivialDestructorBody()

static bool HasTrivialDestructorBody ( ASTContext Context,
const CXXRecordDecl BaseClassDecl,
const CXXRecordDecl MostDerivedClassDecl 
)
static

◆ isInitializerOfDynamicClass()

static bool isInitializerOfDynamicClass ( const CXXCtorInitializer BaseInit)
static

◆ isMemcpyEquivalentSpecialMember()

static bool isMemcpyEquivalentSpecialMember ( const CXXMethodDecl D)
static

◆ LeastDerivedClassWithSameLayout()

static const CXXRecordDecl* LeastDerivedClassWithSameLayout ( const CXXRecordDecl RD)
static