clang 10.0.0git

Macros | Enumerations | Functions
ItaniumCXXABI.cpp File Reference
`#include "CGCXXABI.h"`
`#include "CGCleanup.h"`
`#include "CGRecordLayout.h"`
`#include "CGVTables.h"`
`#include "CodeGenFunction.h"`
`#include "CodeGenModule.h"`
`#include "TargetInfo.h"`
`#include "clang/AST/Attr.h"`
`#include "clang/AST/Mangle.h"`
`#include "clang/AST/StmtCXX.h"`
`#include "clang/AST/Type.h"`
`#include "clang/CodeGen/ConstantInitBuilder.h"`
`#include "llvm/IR/DataLayout.h"`
`#include "llvm/IR/GlobalValue.h"`
`#include "llvm/IR/Instructions.h"`
`#include "llvm/IR/Intrinsics.h"`
`#include "llvm/IR/Value.h"`
`#include "llvm/Support/ScopedPrinter.h"`
`#include "clang/Basic/OpenCLImageTypes.def"`
`#include "clang/Basic/OpenCLExtensionTypes.def"`
`#include "clang/Basic/AArch64SVEACLETypes.def"`
`#include "clang/AST/BuiltinTypes.def"`
`#include "clang/AST/TypeNodes.inc"`
Include dependency graph for ItaniumCXXABI.cpp:

Go to the source code of this file.

## Macros
#define | IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) case BuiltinType::Id:
#define | EXT_OPAQUE_TYPE(ExtType, Id, Ext) case BuiltinType::Id:
#define | SVE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
#define | BUILTIN_TYPE(Id, SingletonId)
#define | PLACEHOLDER_TYPE(Id, SingletonId) case BuiltinType::Id:
#define | TYPE(Class, Base)
#define | ABSTRACT_TYPE(Class, Base)
#define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
#define | NON_CANONICAL_TYPE(Class, Base) case Type::Class:
#define | DEPENDENT_TYPE(Class, Base) case Type::Class:
#define | TYPE(Class, Base)
#define | ABSTRACT_TYPE(Class, Base)
#define | NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
#define | NON_CANONICAL_TYPE(Class, Base) case Type::Class:
#define | DEPENDENT_TYPE(Class, Base) case Type::Class:

## Enumerations
enum | StructorCodegen

## Functions
static llvm::FunctionCallee | getAllocateExceptionFn (CodeGenModule &CGM)
static llvm::FunctionCallee | getThrowFn (CodeGenModule &CGM)
static llvm::FunctionCallee | getItaniumDynamicCastFn (CodeGenFunction &CGF)
static llvm::FunctionCallee | getBadCastFn (CodeGenFunction &CGF)
static CharUnits | computeOffsetHint (ASTContext &Context, const CXXRecordDecl *Src, const CXXRecordDecl *Dst)
| Compute the src2dst_offset hint as described in the Itanium C++ ABI [2.9.7]. More...
static llvm::FunctionCallee | getBadTypeidFn (CodeGenFunction &CGF)
static llvm::Value * | performTypeAdjustment (CodeGenFunction &CGF, Address InitialPtr, int64_t NonVirtualAdjustment, int64_t VirtualAdjustment, bool IsReturnAdjustment)
static llvm::FunctionCallee | getGuardAcquireFn (CodeGenModule &CGM, llvm::PointerType *GuardPtrTy)
static llvm::FunctionCallee | getGuardReleaseFn (CodeGenModule &CGM, llvm::PointerType *GuardPtrTy)
static llvm::FunctionCallee | getGuardAbortFn (CodeGenModule &CGM, llvm::PointerType *GuardPtrTy)
static void | emitGlobalDtorWithCXAAtExit (CodeGenFunction &CGF, llvm::FunctionCallee dtor, llvm::Constant *addr, bool TLS)
| Register a global destructor using __cxa_atexit. More...
static bool | isThreadWrapperReplaceable (const VarDecl *VD, CodeGen::CodeGenModule &CGM)
static llvm::GlobalValue::LinkageTypes | getThreadLocalWrapperLinkage (const VarDecl *VD, CodeGen::CodeGenModule &CGM)
| Get the appropriate linkage for the wrapper function. More...
static bool | TypeInfoIsInStandardLibrary (const BuiltinType *Ty)
| TypeInfoIsInStandardLibrary - Given a builtin type, returns whether the type info for that type is defined in the standard library. More...
static bool | TypeInfoIsInStandardLibrary (const PointerType *PointerTy)
static bool | IsStandardLibraryRTTIDescriptor (QualType Ty)
| IsStandardLibraryRTTIDescriptor - Returns whether the type information for the given type exists in the standard library. More...
static bool | ShouldUseExternalRTTIDescriptor (CodeGenModule &CGM, QualType Ty)
| ShouldUseExternalRTTIDescriptor - Returns whether the type information for the given type exists somewhere else, and that we should not emit the type information in this translation unit. More...
static bool | IsIncompleteClassType (const RecordType *RecordTy)
| IsIncompleteClassType - Returns whether the given record type is incomplete. More...
static bool | ContainsIncompleteClassType (QualType Ty)
| ContainsIncompleteClassType - Returns whether the given type contains an incomplete class type. More...
static bool | CanUseSingleInheritance (const CXXRecordDecl *RD)
static llvm::GlobalVariable::LinkageTypes | getTypeInfoLinkage (CodeGenModule &CGM, QualType Ty)
| Return the linkage that the type info and type info name constants should have for the given type. More...
static unsigned | ComputeVMIClassTypeInfoFlags (const CXXBaseSpecifier *Base, SeenBases &Bases)
| ComputeVMIClassTypeInfoFlags - Compute the value of the flags member in abi::__vmi_class_type_info. More...
static unsigned | ComputeVMIClassTypeInfoFlags (const CXXRecordDecl *RD)
static unsigned | extractPBaseFlags (ASTContext &Ctx, QualType &Type)
| Compute the flags for a __pbase_type_info, and remove the corresponding pieces from `Type`. More...
static StructorCodegen | getCodegenToUse (CodeGenModule &CGM, const CXXMethodDecl *MD)
static void | emitConstructorDestructorAlias (CodeGenModule &CGM, GlobalDecl AliasDecl, GlobalDecl TargetDecl)
static llvm::FunctionCallee | getBeginCatchFn (CodeGenModule &CGM)
static llvm::FunctionCallee | getEndCatchFn (CodeGenModule &CGM)
static llvm::FunctionCallee | getGetExceptionPtrFn (CodeGenModule &CGM)
static llvm::Value * | CallBeginCatch (CodeGenFunction &CGF, llvm::Value *Exn, bool EndMightThrow)
| Emits a call to __cxa_begin_catch and enters a cleanup to call __cxa_end_catch. More...
static void | InitCatchParam (CodeGenFunction &CGF, const VarDecl &CatchParam, Address ParamAddr, SourceLocation Loc)
| A "special initializer" callback for initializing a catch parameter during catch initialization. More...
static llvm::FunctionCallee | getClangCallTerminateFn (CodeGenModule &CGM)
| Get or define the following function: void (i8* exn) nounwind noreturn This code is used only in C++. More...

## Macro Definition Documentation

## ◆ ABSTRACT_TYPE [1/2]

#define ABSTRACT_TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## ◆ ABSTRACT_TYPE [2/2]

#define ABSTRACT_TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## ◆ BUILTIN_TYPE

#define BUILTIN_TYPE | ( |  | Id,
|  |  | SingletonId
| ) |  |

## ◆ DEPENDENT_TYPE [1/2]

#define DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ DEPENDENT_TYPE [2/2]

#define DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ EXT_OPAQUE_TYPE

#define EXT_OPAQUE_TYPE | ( |  | ExtType,
|  |  | Id,
|  |  | Ext
| ) |  | case BuiltinType::Id:

## ◆ IMAGE_TYPE

#define IMAGE_TYPE | ( |  | ImgType,
|  |  | Id,
|  |  | SingletonId,
|  |  | Access,
|  |  | Suffix
| ) |  | case BuiltinType::Id:

## ◆ NON_CANONICAL_TYPE [1/2]

#define NON_CANONICAL_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ NON_CANONICAL_TYPE [2/2]

#define NON_CANONICAL_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [1/2]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/2]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE | ( |  | Class,
|  |  | Base
| ) |  | case Type::Class:

## ◆ PLACEHOLDER_TYPE

#define PLACEHOLDER_TYPE | ( |  | Id,
|  |  | SingletonId
| ) |  | case BuiltinType::Id:

## ◆ SVE_TYPE

#define SVE_TYPE | ( |  | Name,
|  |  | Id,
|  |  | SingletonId
| ) |  | case BuiltinType::Id:

## ◆ TYPE [1/2]

#define TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## ◆ TYPE [2/2]

#define TYPE | ( |  | Class,
|  |  | Base
| ) |  |

## Enumeration Type Documentation

## ◆ StructorCodegen

enum StructorCodegen
| strong

Definition at line 3904 of file ItaniumCXXABI.cpp.

## Function Documentation

## ◆ CallBeginCatch()

static llvm::Value* CallBeginCatch | ( | CodeGenFunction & | CGF,
|  | llvm::Value * | Exn,
|  | bool | EndMightThrow
| ) |  |
| static

Emits a call to __cxa_begin_catch and enters a cleanup to call __cxa_end_catch.

Parameters

  EndMightThrow | - true if __cxa_end_catch might throw

Definition at line 4097 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), getBeginCatchFn(), and clang::CodeGen::NormalAndEHCleanup.

Referenced by InitCatchParam().

## ◆ CanUseSingleInheritance()

static bool CanUseSingleInheritance | ( | const CXXRecordDecl * | RD | ) |
| static

Definition at line 3143 of file ItaniumCXXABI.cpp.

References clang::AS_public, clang::Auto, clang::CXXRecordDecl::bases_begin(), clang::Type::castAs(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CXXBaseSpecifier::getAccessSpecifier(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CXXRecordDecl::getNumBases(), clang::ASTContext::getPointerDiffType(), clang::CXXBaseSpecifier::getType(), clang::Type::getTypeClass(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXRecordDecl::hasDefinition(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CXXRecordDecl::isDynamicClass(), clang::CXXBaseSpecifier::isVirtual(), clang::CodeGen::CodeGenModule::setDSOLocal(), and clang::CodeGen::Type.

## ◆ computeOffsetHint()

static CharUnits computeOffsetHint | ( | ASTContext & | Context,
|  | const CXXRecordDecl * | Src,
|  | const CXXRecordDecl * | Dst
| ) |  |
| static

Compute the src2dst_offset hint as described in the Itanium C++ ABI [2.9.7].

Definition at line 1327 of file ItaniumCXXABI.cpp.

Referenced by getBadTypeidFn().

## ◆ ComputeVMIClassTypeInfoFlags() [1/2]

static unsigned ComputeVMIClassTypeInfoFlags | ( | const CXXBaseSpecifier * | Base,
|  | SeenBases & | Bases
| ) |  |
| static

ComputeVMIClassTypeInfoFlags - Compute the value of the flags member in abi::__vmi_class_type_info.

Definition at line 3619 of file ItaniumCXXABI.cpp.

References clang::Type::castAs(), clang::CXXBaseSpecifier::getType(), and clang::CXXBaseSpecifier::isVirtual().

Referenced by ComputeVMIClassTypeInfoFlags().

## ◆ ComputeVMIClassTypeInfoFlags() [2/2]

static unsigned ComputeVMIClassTypeInfoFlags | ( | const CXXRecordDecl * | RD | ) |
| static

Definition at line 3656 of file ItaniumCXXABI.cpp.

References clang::AS_public, clang::CXXRecordDecl::bases(), ComputeVMIClassTypeInfoFlags(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getItaniumVTableContext(), clang::TargetInfo::getLongWidth(), clang::CXXRecordDecl::getNumBases(), clang::TargetInfo::getPointerWidth(), clang::CharUnits::getQuantity(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenModule::getTypes(), clang::ItaniumVTableContext::getVirtualBaseOffsetOffset(), clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, Offset, clang::CodeGen::Type, and clang::ASTContext::UnsignedIntTy.

## ◆ ContainsIncompleteClassType()

static bool ContainsIncompleteClassType | ( | QualType | Ty | ) |
| static

ContainsIncompleteClassType - Returns whether the given type contains an incomplete class type.

This is true if

- The given type is an incomplete class type.
- The given type is a pointer type whose pointee type contains an incomplete class type.
- The given type is a member pointer type whose class is an incomplete class type.
- The given type is a member pointer type whoise pointee type contains an incomplete class type. is an indirect or direct pointer to an incomplete class type.

Definition at line 3118 of file ItaniumCXXABI.cpp.

References IsIncompleteClassType().

Referenced by extractPBaseFlags(), and getTypeInfoLinkage().

## ◆ emitConstructorDestructorAlias()

static void emitConstructorDestructorAlias | ( | CodeGenModule & | CGM,
|  | GlobalDecl | AliasDecl,
|  | GlobalDecl | TargetDecl
| ) |  |
| static

Definition at line 3943 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::addReplacement(), clang::CodeGen::CodeGenModule::codegenCXXStructor(), clang::serialized_diags::create(), clang::Ctor_Base, clang::Ctor_Complete, clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), getCodegenToUse(), clang::GlobalDecl::getCtorType(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), clang::GlobalDecl::getWithCtorType(), clang::GlobalDecl::getWithDtorType(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::CodeGen::CodeGenModule::SetCommonAttributes(), and clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias().

## ◆ emitGlobalDtorWithCXAAtExit()

static void emitGlobalDtorWithCXAAtExit | ( | CodeGenFunction & | CGF,
|  | llvm::FunctionCallee | dtor,
|  | llvm::Constant * | addr,
|  | bool | TLS
| ) |  |
| static

Register a global destructor using __cxa_atexit.

Definition at line 2373 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::FunctionDecl::Create(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), dtorTy(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenFunction::FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenTypes::getCodeGenOpts(), clang::ASTContext::getFunctionType(), clang::CodeGen::CodeGenFunction::getTarget(), clang::VarDecl::getTLSKind(), clang::ASTContext::getTranslationUnitDecl(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenFunction::getTypes(), clang::HiddenVisibility, clang::ASTContext::Idents, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntTy, clang::VarDecl::isNoDestroy(), clang::None, Priority, clang::CodeGen::CodeGenFunction::registerGlobalDtorWithAtExit(), clang::SC_Static, clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::Type, clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::ASTContext::VoidTy.

## ◆ extractPBaseFlags()

static unsigned extractPBaseFlags | ( | ASTContext & | Ctx,
|  | QualType & | Type
| ) |  |
| static

Compute the flags for a __pbase_type_info, and remove the corresponding pieces from `Type`.

Definition at line 3756 of file ItaniumCXXABI.cpp.

References ContainsIncompleteClassType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::DefaultVisibility, clang::EST_None, clang::ExternalLinkage, clang::Type::getAs(), clang::MemberPointerType::getClass(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), clang::CodeGen::CodeGenModule::GetLLVMVisibility(), clang::MemberPointerType::getPointeeType(), clang::CodeGen::CodeGenModule::getTypes(), clang::QualType::getUnqualifiedType(), clang::NamedDecl::getVisibility(), clang::Type::getVisibility(), clang::Decl::hasAttr(), clang::QualType::isConstQualified(), IsIncompleteClassType(), clang::QualType::isRestrictQualified(), clang::QualType::isVolatileQualified(), clang::CodeGen::Type, and clang::ASTContext::UnsignedIntTy.

## ◆ getAllocateExceptionFn()

static llvm::FunctionCallee getAllocateExceptionFn | ( | CodeGenModule & | CGM | ) |
| static

Definition at line 1242 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by getThrowFn().

## ◆ getBadCastFn()

static llvm::FunctionCallee getBadCastFn | ( | CodeGenFunction & | CGF | ) |
| static

Definition at line 1319 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by getBadTypeidFn().

## ◆ getBadTypeidFn()

static llvm::FunctionCallee getBadTypeidFn | ( | CodeGenFunction & | CGF | ) |
| static

Definition at line 1377 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, computeOffsetHint(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::Ctor_Base, clang::Ctor_Complete, clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitRuntimeCallOrInvoke(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAsCXXRecordDecl(), getBadCastFn(), clang::CodeGen::CodeGenFunction::getContext(), getItaniumDynamicCastFn(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ASTContext::getPointerDiffType(), clang::CharUnits::getQuantity(), clang::QualType::getUnqualifiedType(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), clang::CXXRecordDecl::isAbstract(), clang::Type::isReferenceType(), clang::interp::This(), clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.

## ◆ getBeginCatchFn()

static llvm::FunctionCallee getBeginCatchFn | ( | CodeGenModule & | CGM | ) |
| static

Definition at line 4041 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by CallBeginCatch(), and getClangCallTerminateFn().

## ◆ getClangCallTerminateFn()

static llvm::FunctionCallee getClangCallTerminateFn | ( | CodeGenModule & | CGM | ) |
| static

Get or define the following function: void (i8* exn) nounwind noreturn This code is used only in C++.

Definition at line 4332 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::Create(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::CurrentFuncletPad, clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), getBeginCatchFn(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), clang::CodeGen::CodeGenFunction::getTarget(), clang::CodeGen::CodeGenModule::getTerminateFn(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), clang::TargetInfo::hasFeature(), clang::HiddenVisibility, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::NormalCleanup, clang::CodeGen::CodeGenModule::supportsCOMDAT(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

## ◆ getCodegenToUse()

static StructorCodegen getCodegenToUse | ( | CodeGenModule & | CGM,
|  | const CXXMethodDecl * | MD
| ) |  |
| static

Definition at line 3906 of file ItaniumCXXABI.cpp.

References clang::Ctor_Complete, clang::Dtor_Complete, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getFunctionLinkage(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CodeGenModule::getTarget(), and clang::TargetInfo::getTriple().

Referenced by emitConstructorDestructorAlias().

## ◆ getEndCatchFn()

static llvm::FunctionCallee getEndCatchFn | ( | CodeGenModule & | CGM | ) |
| static

Definition at line 4049 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by getGetExceptionPtrFn().

## ◆ getGetExceptionPtrFn()

static llvm::FunctionCallee getGetExceptionPtrFn | ( | CodeGenModule & | CGM | ) |
| static

Definition at line 4057 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitRuntimeCallOrInvoke(), getEndCatchFn(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by InitCatchParam().

## ◆ getGuardAbortFn()

static llvm::FunctionCallee getGuardAbortFn | ( | CodeGenModule & | CGM,
|  | llvm::PointerType * | GuardPtrTy
| ) |  |
| static

Definition at line 2160 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

## ◆ getGuardAcquireFn()

static llvm::FunctionCallee getGuardAcquireFn | ( | CodeGenModule & | CGM,
|  | llvm::PointerType * | GuardPtrTy
| ) |  |
| static

Definition at line 2135 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getTypes(), and clang::ASTContext::IntTy.

## ◆ getGuardReleaseFn()

static llvm::FunctionCallee getGuardReleaseFn | ( | CodeGenModule & | CGM,
|  | llvm::PointerType * | GuardPtrTy
| ) |  |
| static

Definition at line 2148 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

## ◆ getItaniumDynamicCastFn()

static llvm::FunctionCallee getItaniumDynamicCastFn | ( | CodeGenFunction & | CGF | ) |
| static

Definition at line 1296 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::ASTContext::getPointerDiffType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::Type.

Referenced by getBadTypeidFn().

## ◆ getThreadLocalWrapperLinkage()

static llvm::GlobalValue::LinkageTypes getThreadLocalWrapperLinkage | ( | const VarDecl * | VD,
|  | CodeGen::CodeGenModule & | CGM
| ) |  |
| static

Get the appropriate linkage for the wrapper function.

This is essentially the weak form of the variable's linkage; every translation unit which needs the wrapper emits a copy, and we want the linker to merge them.

Definition at line 2506 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), clang::serialized_diags::create(), clang::Create(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), clang::ExternalLinkage, clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc(), clang::CharUnits::getAsAlign(), getCanonicalDecl(), clang::VarDecl::getCanonicalDecl(), clang::CodeGen::CodeGenModule::GetGlobalValue(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getTarget(), clang::VarDecl::getTemplateSpecializationKind(), getTemplateSpecializationKind(), clang::CodeGen::CodeGenModule::getTriple(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::NamedDecl::getVisibility(), clang::VarDecl::hasDefinition(), clang::HiddenVisibility, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::InternalLinkage, clang::isDiscardableGVALinkage(), clang::Type::isReferenceType(), clang::isTemplateInstantiation(), isThreadWrapperReplaceable(), clang::CharUnits::One(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), V, and clang::CodeGen::CodeGenTypeCache::VoidTy.

## ◆ getThrowFn()

static llvm::FunctionCallee getThrowFn | ( | CodeGenModule & | CGM | ) |
| static

Definition at line 1251 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::Dtor_Complete, clang::CodeGen::CodeGenFunction::EmitAnyExprToExn(), clang::CodeGen::CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), getAllocateExceptionFn(), clang::Type::getAs(), clang::CodeGen::CodeGenFunction::getContext(), clang::CXXRecordDecl::getDestructor(), clang::ASTContext::getExnObjectAlignment(), clang::CXXThrowExpr::getSubExpr(), clang::Expr::getType(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by decomposeTypeForEH().

## ◆ getTypeInfoLinkage()

static llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage | ( | CodeGenModule & | CGM,
|  | QualType | Ty
| ) |  |
| static

Return the linkage that the type info and type info name constants should have for the given type.

Definition at line 3298 of file ItaniumCXXABI.cpp.

References ContainsIncompleteClassType(), clang::ExternalLinkage, clang::QualType::getCanonicalType(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Type::getLinkage(), clang::ASTContext::getTargetInfo(), clang::CodeGen::CodeGenModule::getTriple(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenModule::getVTableLinkage(), clang::Decl::hasAttr(), clang::InternalLinkage, clang::CXXRecordDecl::isDynamicClass(), clang::ModuleInternalLinkage, clang::ModuleLinkage, clang::NoLinkage, ShouldUseExternalRTTIDescriptor(), clang::UniqueExternalLinkage, and clang::VisibleNoLinkage.

## ◆ InitCatchParam()

static void InitCatchParam | ( | CodeGenFunction & | CGF,
|  | const VarDecl & | CatchParam,
|  | Address | ParamAddr,
|  | SourceLocation | Loc
| ) |  |
| static

A "special initializer" callback for initializing a catch parameter during catch initialization.

Definition at line 4110 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::Builder, CallBeginCatch(), clang::interp::Cast(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::CreateTempAlloca(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::CodeGenFunction::EHStack, clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitARCInitWeak(), clang::CodeGen::CodeGenFunction::EmitARCRetainNonBlock(), clang::CodeGen::CodeGenFunction::EmitLoadOfComplex(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenFunction::EmitStoreOfComplex(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::OpaqueValueExpr::findInCopyConstruct(), clang::CodeGen::AggValueSlot::forAddr(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::CodeGen::CodeGenFunction::getExceptionFromSlot(), getGetExceptionPtrFn(), clang::VarDecl::getInit(), clang::Qualifiers::getObjCLifetime(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CanQual< T >::getQualifiers(), clang::CodeGen::TargetCodeGenInfo::getSizeOfUnwindException(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::ValueDecl::getType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, clang::Type::isRecordType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::CodeGen::EHScopeStack::popTerminate(), clang::CodeGen::EHScopeStack::pushTerminate(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::CodeGen::Type.

## ◆ IsIncompleteClassType()

static bool IsIncompleteClassType | ( | const RecordType * | RecordTy | ) |
| static

IsIncompleteClassType - Returns whether the given record type is incomplete.

Definition at line 3103 of file ItaniumCXXABI.cpp.

References clang::RecordType::getDecl(), and clang::TagDecl::isCompleteDefinition().

Referenced by ContainsIncompleteClassType(), and extractPBaseFlags().

## ◆ IsStandardLibraryRTTIDescriptor()

static bool IsStandardLibraryRTTIDescriptor | ( | QualType | Ty | ) |
| static

IsStandardLibraryRTTIDescriptor - Returns whether the type information for the given type exists in the standard library.

Definition at line 3047 of file ItaniumCXXABI.cpp.

References TypeInfoIsInStandardLibrary().

## ◆ isThreadWrapperReplaceable()

static bool isThreadWrapperReplaceable | ( | const VarDecl * | VD,
|  | CodeGen::CodeGenModule & | CGM
| ) |  |
| static

Definition at line 2493 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenModule::getTarget(), clang::VarDecl::getTLSKind(), clang::TargetInfo::getTriple(), clang::VarDecl::isStaticLocal(), and clang::VarDecl::TLS_Dynamic.

Referenced by getThreadLocalWrapperLinkage().

## ◆ performTypeAdjustment()

static llvm::Value* performTypeAdjustment | ( | CodeGenFunction & | CGF,
|  | Address | InitialPtr,
|  | int64_t | NonVirtualAdjustment,
|  | int64_t | VirtualAdjustment,
|  | bool | IsReturnAdjustment
| ) |  |
| static

Definition at line 1923 of file ItaniumCXXABI.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::CurGD, clang::ast_matchers::expr, clang::CharUnits::fromQuantity(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAddressSpace(), clang::CodeGen::CodeGenFunction::getContext(), clang::GlobalDecl::getDecl(), clang::CodeGen::Address::getElementType(), clang::CXXNewExpr::getOperatorNew(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ASTContext::getPointerDiffType(), clang::CodeGen::CodeGenTypeCache::getSizeSize(), clang::CodeGen::Address::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CharUnits::isZero(), clang::ReturnAdjustment::VirtualAdjustment::Itanium, clang::ThisAdjustment::VirtualAdjustment::Itanium, max(), clang::ReturnAdjustment::NonVirtual, clang::ThisAdjustment::NonVirtual, Offset, Ret(), clang::CodeGen::CodeGenFunction::ReturnValue, clang::CodeGen::CodeGenTypeCache::SizeTy, clang::CodeGen::Type, V, clang::ReturnAdjustment::VirtualAdjustment::VBaseOffsetOffset, clang::ThisAdjustment::VirtualAdjustment::VCallOffsetOffset, clang::ReturnAdjustment::Virtual, and clang::ThisAdjustment::Virtual.

## ◆ ShouldUseExternalRTTIDescriptor()

static bool ShouldUseExternalRTTIDescriptor | ( | CodeGenModule & | CGM,
|  | QualType | Ty
| ) |  |
| static

ShouldUseExternalRTTIDescriptor - Returns whether the type information for the given type exists somewhere else, and that we should not emit the type information in this translation unit.

Assumes that it is not a standard-library type.

Definition at line 3064 of file ItaniumCXXABI.cpp.

Referenced by getTypeInfoLinkage().

## ◆ TypeInfoIsInStandardLibrary() [1/2]

static bool TypeInfoIsInStandardLibrary | ( | const BuiltinType * | Ty | ) |
| static

TypeInfoIsInStandardLibrary - Given a builtin type, returns whether the type info for that type is defined in the standard library.

Definition at line 2927 of file ItaniumCXXABI.cpp.

References clang::BuiltinType::getKind().

Referenced by IsStandardLibraryRTTIDescriptor(), and TypeInfoIsInStandardLibrary().

## ◆ TypeInfoIsInStandardLibrary() [2/2]

static bool TypeInfoIsInStandardLibrary | ( | const PointerType * | PointerTy | ) |
| static

Definition at line 3029 of file ItaniumCXXABI.cpp.

References clang::Qualifiers::empty(), clang::PointerType::getPointeeType(), clang::QualType::getQualifiers(), clang::Qualifiers::removeConst(), and TypeInfoIsInStandardLibrary().