clang
10.0.0git
|
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGVTables.h"
#include "CodeGenModule.h"
#include "CodeGenTypes.h"
#include "TargetInfo.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/CodeGen/ConstantInitBuilder.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/IR/Intrinsics.h"
Go to the source code of this file.
Functions | |
static llvm::CallBase * | emitRTtypeidCall (CodeGenFunction &CGF, llvm::Value *Argument) |
static bool | isDeletingDtor (GlobalDecl GD) |
static bool | IsSizeGreaterThan128 (const CXXRecordDecl *RD) |
static bool | hasMicrosoftABIRestrictions (const CXXRecordDecl *RD) |
static bool | hasDefaultCXXMethodCC (ASTContext &Context, const CXXMethodDecl *MD) |
static void | mangleVFTableName (MicrosoftMangleContext &MangleContext, const CXXRecordDecl *RD, const VPtrInfo &VFPtr, SmallString< 256 > &Name) |
static void | emitGlobalDtorWithTLRegDtor (CodeGenFunction &CGF, const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr) |
static ConstantAddress | getInitThreadEpochPtr (CodeGenModule &CGM) |
static llvm::FunctionCallee | getInitThreadHeaderFn (CodeGenModule &CGM) |
static llvm::FunctionCallee | getInitThreadFooterFn (CodeGenModule &CGM) |
static llvm::FunctionCallee | getInitThreadAbortFn (CodeGenModule &CGM) |
static llvm::GlobalVariable * | getTypeInfoVTable (CodeGenModule &CGM) |
static void | serializeClassHierarchy (SmallVectorImpl< MSRTTIClass > &Classes, const CXXRecordDecl *RD) |
Recursively serializes a class hierarchy in pre-order depth first order. More... | |
static void | detectAmbiguousBases (SmallVectorImpl< MSRTTIClass > &Classes) |
Find ambiguity among base classes. More... | |
static QualType | decomposeTypeForEH (ASTContext &Context, QualType T, bool &IsConst, bool &IsVolatile, bool &IsUnaligned) |
|
static |
Definition at line 3769 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), clang::Create(), clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::Ctor_Complete, clang::Ctor_CopyingClosure, clang::Ctor_DefaultClosure, clang::CodeGen::CodeGenFunction::CurGD, detectAmbiguousBases(), clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getCopyConstructorForExceptionObject(), clang::GlobalDecl::getDecl(), clang::CXXRecordDecl::getDestructor(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CGFunctionInfo::getEffectiveCallingConvention(), clang::ASTContext::getExceptionObjectType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Decl::getLocation(), clang::ASTContext::getMemberPointerType(), clang::CodeGen::CodeGenModule::getMicrosoftVTableContext(), clang::CodeGen::CodeGenModule::getModule(), clang::FunctionDecl::getNumParams(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CXXThrowExpr::getSubExpr(), clang::CXXMethodDecl::getThisType(), getThrowFn(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::TypeDecl::getTypeForDecl(), getTypeInfoVTable(), clang::CodeGen::CodeGenModule::getTypes(), clang::QualType::getUnqualifiedType(), clang::ASTRecordLayout::getVBPtrOffset(), clang::MicrosoftVTableContext::getVBTableIndex(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), clang::GlobalDecl::getWithCtorType(), clang::GlobalDecl::getWithDtorType(), hasDefaultCXXMethodCC(), clang::Qualifiers::hasUnaligned(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::QualType::isConstQualified(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::Type::isObjectType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::QualType::isVolatileQualified(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::ImplicitParamDecl::Other, clang::FunctionDecl::parameters(), serializeClassHierarchy(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), and clang::CodeGen::Type.
|
static |
Find ambiguity among base classes.
Definition at line 3565 of file MicrosoftCXXABI.cpp.
References clang::VPtrInfo::FullOffsetInMDC, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getMicrosoftVTableContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CXXRecordDecl::getNumVBases(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeDeclType(), clang::ASTRecordLayout::getVBaseOffsetsMap(), clang::VPtrInfo::getVBaseWithVPtr(), clang::ASTRecordLayout::getVBPtrOffset(), clang::MicrosoftVTableContext::getVBTableIndex(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::VPtrInfo::MangledPath, clang::VPtrInfo::NonVirtualOffset, serializeClassHierarchy(), and clang::CodeGen::Type.
Referenced by decomposeTypeForEH().
|
static |
Definition at line 2269 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CodeGenModule::AppendLinkerOptions(), clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTarget(), clang::VarDecl::getTLSKind(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::CodeGen::CodeGenTypeCache::IntTy, clang::VarDecl::isNoDestroy(), clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
|
static |
Definition at line 937 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitRuntimeCallOrInvoke(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getASTRecordLayout(), clang::GlobalDecl::getDecl(), clang::CodeGen::Address::getPointer(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::QualType::getUnqualifiedType(), clang::ASTRecordLayout::getVBPtrOffset(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::ASTContext::IntTy, clang::Type::isReferenceType(), Offset, clang::interp::This(), and clang::CodeGen::Type.
|
static |
Definition at line 2398 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2360 of file MicrosoftCXXABI.cpp.
References clang::ExternalLinkage, clang::CharUnits::getAsAlign(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::CodeGen::CodeGenModule::getModule(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2386 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2374 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 3435 of file MicrosoftCXXABI.cpp.
References clang::AS_public, clang::CXXRecordDecl::bases(), clang::ExternalLinkage, clang::CXXBaseSpecifier::getAccessSpecifier(), clang::Decl::getASTContext(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::Type::getLinkage(), clang::CodeGen::CodeGenModule::getModule(), clang::CharUnits::getQuantity(), clang::initialize(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::InternalLinkage, clang::CXXBaseSpecifier::isVirtual(), clang::ModuleInternalLinkage, clang::ModuleLinkage, clang::NoLinkage, Parent, Specifier, clang::UniqueExternalLinkage, and clang::VisibleNoLinkage.
Referenced by decomposeTypeForEH().
|
static |
Definition at line 1213 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, clang::ImplicitParamDecl::Create(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateConstByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP2_32(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::Ctor_Base, clang::Ctor_Complete, clang::Ctor_DefaultClosure, clang::CodeGen::CodeGenFunction::CurCodeDecl, clang::CodeGen::CodeGenFunction::CurFuncDecl, clang::CodeGen::CodeGenFunction::CurFuncIsThunk, clang::CodeGen::CodeGenFunction::CurGD, clang::Dtor_Base, clang::Dtor_Comdat, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CGCallee::forDirect(), clang::VPtrInfo::FullOffsetInMDC, clang::CodeGen::RValue::get(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::GlobalDecl::getDecl(), clang::ASTContext::getDefaultCallingConvention(), clang::GlobalDecl::getDtorType(), clang::Decl::getLocation(), clang::FunctionDecl::getNumParams(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::CharUnits::getQuantity(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getVBaseAlignment(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::ASTRecordLayout::getVBaseOffsetsMap(), clang::ASTRecordLayout::getVBPtrOffset(), clang::MicrosoftVTableContext::getVFPtrOffsets(), clang::MicrosoftVTableContext::getVFTableLayout(), clang::GVA_Internal, clang::Decl::hasAttr(), clang::ASTContext::Idents, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::InternalLinkage, clang::ASTContext::IntTy, clang::CXXConstructorDecl::isDefaultConstructor(), isDeletingDtor(), clang::CharUnits::isPositive(), clang::FunctionProtoType::isVariadic(), clang::CXXMethodDecl::isVirtual(), clang::CharUnits::isZero(), Offset, clang::ImplicitParamDecl::Other, clang::VPtrInfo::PathToIntroducingObject, clang::CodeGen::CodeGenFunction::ReturnValue, clang::interp::This(), clang::CodeGen::Type, clang::MethodVFTableLocation::VBase, clang::MethodVFTableLocation::VFPtrOffset, clang::VTableLayout::vtable_components(), and clang::CharUnits::Zero().
Referenced by decomposeTypeForEH(), and clang::ASTNameGenerator::Implementation::getAllManglings().
|
static |
Definition at line 1064 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::RecordDecl::canPassInRegisters(), classifyReturnType(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CXXRecordDecl::ctors(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::ABIArgInfo::getIndirect(), clang::CXXRecordDecl::getNumBases(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::ASTRecordLayout::getVBaseOffsetsMap(), clang::CXXRecordDecl::hasNonTrivialCopyAssignment(), clang::CXXRecordDecl::hasNonTrivialDestructor(), clang::CXXRecordDecl::hasPrivateFields(), clang::CXXRecordDecl::hasProtectedFields(), isInstanceMethod(), clang::CodeGen::CGFunctionInfo::isInstanceMethod(), clang::CXXRecordDecl::isPOD(), clang::CXXRecordDecl::isPolymorphic(), IsSizeGreaterThan128(), clang::CodeGen::ABIArgInfo::setInReg(), and clang::CodeGen::ABIArgInfo::setSRetAfterThis().
|
static |
Definition at line 1051 of file MicrosoftCXXABI.cpp.
References clang::Dtor_Deleting, clang::GlobalDecl::getDecl(), and clang::GlobalDecl::getDtorType().
Referenced by hasDefaultCXXMethodCC().
|
static |
Definition at line 1060 of file MicrosoftCXXABI.cpp.
References clang::Decl::getASTContext(), clang::TypeDecl::getTypeForDecl(), and clang::ASTContext::getTypeSize().
Referenced by hasMicrosoftABIRestrictions().
|
static |
Definition at line 1709 of file MicrosoftCXXABI.cpp.
References clang::BaseSubobject::getBaseOffset(), clang::MicrosoftVTableContext::getVFPtrOffsets(), clang::MicrosoftMangleContext::mangleCXXVFTable(), and clang::VPtrInfo::MangledPath.
|
static |
Recursively serializes a class hierarchy in pre-order depth first order.
Definition at line 3556 of file MicrosoftCXXABI.cpp.
References clang::CXXRecordDecl::bases(), and clang::CodeGen::Address::getType().
Referenced by decomposeTypeForEH(), and detectAmbiguousBases().