clang
7.0.0
|
#include "CGCXXABI.h"
#include "CGCleanup.h"
#include "CGVTables.h"
#include "CodeGenModule.h"
#include "CodeGenTypes.h"
#include "TargetInfo.h"
#include "clang/CodeGen/ConstantInitBuilder.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/VTableBuilder.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Intrinsics.h"
Go to the source code of this file.
Functions | |
static llvm::CallSite | emitRTtypeidCall (CodeGenFunction &CGF, llvm::Value *Argument) |
static bool | isDeletingDtor (GlobalDecl GD) |
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::Constant *Dtor, llvm::Constant *Addr) |
static ConstantAddress | getInitThreadEpochPtr (CodeGenModule &CGM) |
static llvm::Constant * | getInitThreadHeaderFn (CodeGenModule &CGM) |
static llvm::Constant * | getInitThreadFooterFn (CodeGenModule &CGM) |
static llvm::Constant * | 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 void | emitCXXConstructor (CodeGenModule &CGM, const CXXConstructorDecl *ctor, StructorType ctorType) |
static void | emitCXXDestructor (CodeGenModule &CGM, const CXXDestructorDecl *dtor, StructorType dtorType) |
|
static |
Definition at line 3705 of file MicrosoftCXXABI.cpp.
References clang::Type::getAs(), clang::ASTContext::getExceptionObjectType(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getMemberPointerType(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), getTypeInfoVTable(), clang::QualType::getUnqualifiedType(), clang::Qualifiers::hasUnaligned(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::QualType::isConstQualified(), clang::QualType::isNull(), clang::Type::isPointerType(), clang::Type::isReferenceType(), and clang::QualType::isVolatileQualified().
Referenced by emitCXXDestructor().
|
static |
Find ambiguity among base classes.
Definition at line 3501 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 emitCXXDestructor().
|
static |
Definition at line 3814 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::codegenCXXStructor(), clang::CodeGen::Complete, and clang::CodeGen::CodeGenModule::maybeSetTrivialComdat().
Referenced by emitCXXDestructor().
|
static |
Definition at line 3822 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::CodeGen::CodeGenTypes::arrangeMSCtorClosure(), clang::CodeGen::Base, clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), clang::CodeGen::Complete, 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, decomposeTypeForEH(), detectAmbiguousBases(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), emitCXXConstructor(), 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::getAsCXXRecordDecl(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getCopyConstructorForExceptionObject(), clang::CXXRecordDecl::getDestructor(), clang::CodeGen::CGFunctionInfo::getEffectiveCallingConvention(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::Decl::getLocation(), 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(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTRecordLayout::getVBPtrOffset(), clang::MicrosoftVTableContext::getVBTableIndex(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), hasDefaultCXXMethodCC(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::Type::isNullPtrType(), clang::Type::isObjectType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::ImplicitParamDecl::Other, clang::FunctionDecl::parameters(), serializeClassHierarchy(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), and clang::CodeGen::Type.
|
static |
Definition at line 2222 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CodeGenModule::AppendLinkerOptions(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::createAtExitStub(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTarget(), clang::VarDecl::getTLSKind(), clang::TargetInfo::getTriple(), clang::InternalLinkage, clang::CodeGen::CodeGenTypeCache::IntTy, and clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit().
|
static |
Definition at line 930 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(), and clang::CodeGen::Type.
|
static |
Definition at line 2347 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2309 of file MicrosoftCXXABI.cpp.
References clang::ExternalLinkage, clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::CodeGen::CodeGenModule::getModule(), clang::CharUnits::getQuantity(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2335 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 2323 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
|
static |
Definition at line 3371 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 1184 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::Ctor_Complete, clang::Ctor_DefaultClosure, clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getDefaultCallingConvention(), clang::FunctionDecl::getNumParams(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), and clang::CXXConstructorDecl::isDefaultConstructor().
Referenced by emitCXXDestructor(), and clang::index::CodegenNameGenerator::Implementation::getAllManglings().
|
static |
Definition at line 1044 of file MicrosoftCXXABI.cpp.
References clang::CodeGen::CodeGenFunction::Builder, classifyReturnType(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::Dtor_Deleting, clang::CodeGen::CodeGenFunction::EmitBlock(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::ABIArgInfo::getIndirect(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::ASTRecordLayout::getVBaseOffsetsMap(), clang::CodeGen::CGFunctionInfo::isInstanceMethod(), clang::CXXRecordDecl::isPOD(), clang::CodeGen::ABIArgInfo::setSRetAfterThis(), and clang::CodeGen::ABIArgInfo::setSuppressSRet().
|
static |
Definition at line 1673 of file MicrosoftCXXABI.cpp.
References clang::BaseSubobject::getBaseOffset(), clang::MicrosoftMangleContext::mangleCXXVFTable(), and clang::VPtrInfo::MangledPath.
|
static |
Recursively serializes a class hierarchy in pre-order depth first order.
Definition at line 3492 of file MicrosoftCXXABI.cpp.
References clang::CXXRecordDecl::bases(), and clang::CodeGen::Address::getType().
Referenced by detectAmbiguousBases(), and emitCXXDestructor().