clang API Documentation
#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"
Go to the source code of this file.
static llvm::Value* ApplyNonVirtualAndVirtualOffset | ( | CodeGenFunction & | CGF, |
llvm::Value * | ptr, | ||
CharUnits | nonVirtualOffset, | ||
llvm::Value * | virtualOffset | ||
) | [static] |
Definition at line 113 of file CGClass.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CharUnits::isZero(), and clang::CodeGen::CodeGenTypeCache::PtrDiffTy.
Referenced by clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), and clang::CodeGen::CodeGenFunction::InitializeVTablePointer().
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 CharUnits ComputeNonVirtualBaseClassOffset | ( | ASTContext & | Context, |
const CXXRecordDecl * | DerivedClass, | ||
CastExpr::path_const_iterator | Start, | ||
CastExpr::path_const_iterator | End | ||
) | [static] |
Definition at line 32 of file CGClass.cpp.
References clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::CXXBaseSpecifier::getType(), clang::CXXBaseSpecifier::isVirtual(), and clang::CharUnits::Zero().
Referenced by clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), and clang::CodeGen::CodeGenModule::GetNonVirtualBaseClassOffset().
static void EmitAggMemberInitializer | ( | CodeGenFunction & | CGF, |
LValue | LHS, | ||
Expr * | Init, | ||
llvm::Value * | ArrayIndexVar, | ||
QualType | T, | ||
ArrayRef< VarDecl * > | ArrayIndexes, | ||
unsigned | Index | ||
) | [static] |
Definition at line 440 of file CGClass.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitBranch(), clang::CodeGen::CodeGenFunction::EmitComplexExprIntoLValue(), clang::CodeGen::CodeGenFunction::EmitScalarInit(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::LValue::getAlignment(), clang::ASTContext::getAsConstantArrayType(), clang::CodeGen::CodeGenFunction::getContext(), clang::ArrayType::getElementType(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::ConstantArrayType::getSize(), clang::ASTContext::getSizeType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::LValue::setAddress(), clang::CodeGen::LValue::setAlignment(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by clang::CodeGen::CodeGenFunction::EmitInitializerForField().
static void EmitBaseInitializer | ( | CodeGenFunction & | CGF, |
const CXXRecordDecl * | ClassDecl, | ||
CXXCtorInitializer * | BaseInit, | ||
CXXCtorType | CtorType | ||
) | [static] |
Definition at line 394 of file CGClass.cpp.
References BaseInitializerUsesThis(), clang::CodeGen::CodeGenFunction::CGM, clang::Ctor_Base, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::EHCleanup, clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::Type::getAs(), clang::CXXCtorInitializer::getBaseClass(), clang::CodeGen::CodeGenFunction::getContext(), clang::CXXCtorInitializer::getInit(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ASTContext::getTypeAlignInChars(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::CodeGenFunction::InitializeVTablePointers(), clang::CXXCtorInitializer::isBaseInitializer(), clang::CXXCtorInitializer::isBaseVirtual(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, and clang::CodeGen::CodeGenFunction::LoadCXXThis().
Referenced by clang::CodeGen::CodeGenFunction::EmitCtorPrologue().
static void EmitMemberInitializer | ( | CodeGenFunction & | CGF, |
const CXXRecordDecl * | ClassDecl, | ||
CXXCtorInitializer * | MemberInit, | ||
const CXXConstructorDecl * | Constructor, | ||
FunctionArgList & | Args | ||
) | [static] |
Definition at line 542 of file CGClass.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::IndirectFieldDecl::chain(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::IndirectFieldDecl::getAnonField(), clang::CXXCtorInitializer::getAnyMember(), clang::CXXCtorInitializer::getArrayIndexes(), clang::ASTContext::getAsConstantArrayType(), clang::ASTContext::getBaseElementType(), clang::CXXConstructExpr::getConstructor(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXCtorInitializer::getIndirectMember(), clang::CXXCtorInitializer::getInit(), clang::CXXCtorInitializer::getNumArrayIndices(), clang::CodeGen::CGCXXABI::getSrcArgforCopyCtor(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::CXXCtorInitializer::isAnyMemberInitializer(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::CXXCtorInitializer::isIndirectMemberInitializer(), clang::QualType::isPODType(), clang::FunctionDecl::isTrivial(), clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CodeGenFunction::LoadCXXThis(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
static bool FieldHasTrivialDestructorBody | ( | ASTContext & | Context, |
const FieldDecl * | Field | ||
) | [static] |
Definition at line 1321 of file CGClass.cpp.
References clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::RecordType::getDecl(), clang::ValueDecl::getType(), and HasTrivialDestructorBody().
Referenced by CanSkipVTablePointerInitialization(), and HasTrivialDestructorBody().
static bool HasTrivialDestructorBody | ( | ASTContext & | Context, |
const CXXRecordDecl * | BaseClassDecl, | ||
const CXXRecordDecl * | MostDerivedClassDecl | ||
) | [static] |
Definition at line 1278 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), FieldHasTrivialDestructorBody(), clang::CXXRecordDecl::getDestructor(), clang::FunctionDecl::hasTrivialBody(), clang::CXXRecordDecl::hasTrivialDestructor(), and clang::CXXRecordDecl::vbases().
Referenced by FieldHasTrivialDestructorBody().
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] |
Definition at line 2078 of file CGClass.cpp.
References clang::CK_NoOp, and clang::UO_Extension.
Referenced by clang::CodeGen::CodeGenFunction::CanDevirtualizeMemberFunctionCall().