class CGCXXABI

Declaration

class CGCXXABI { /* full declaration omitted */ };

Description

Implements C++ ABI-specific code generation functions.

Declared at: clang/lib/CodeGen/CGCXXABI.h:43

Member Variables

protected clang::CodeGen::CodeGenModule& CGM
protected std::unique_ptr<MangleContext> MangleCtx

Method Overview

  • protected CGCXXABI(clang::CodeGen::CodeGenModule & CGM)
  • public virtual llvm::Type * ConvertMemberPointerType(const clang::MemberPointerType * MPT)
  • public virtual bool EmitBadCastCall(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual void EmitBadTypeidCall(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual void EmitCXXConstructors(const clang::CXXConstructorDecl * D)
  • public virtual void EmitCXXDestructors(const clang::CXXDestructorDecl * D)
  • public virtual llvm::BasicBlock * EmitCtorCompleteObjectHandler(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXRecordDecl * RD)
  • public virtual void EmitDestructorCall(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXDestructorDecl * DD, clang::CXXDtorType Type, bool ForVirtualBase, bool Delegating, clang::CodeGen::Address This, clang::QualType ThisTy)
  • public virtual llvm::Value * EmitDynamicCastCall(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address Value, clang::QualType SrcRecordTy, clang::QualType DestTy, clang::QualType DestRecordTy, llvm::BasicBlock * CastEnd)
  • public virtual llvm::Value * EmitDynamicCastToVoid(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address Value, clang::QualType SrcRecordTy, clang::QualType DestTy)
  • public virtual void EmitGuardedInit(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl & D, llvm::GlobalVariable * DeclPtr, bool PerformInit)
  • public virtual void EmitInstanceFunctionProlog(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual clang::CodeGen::CGCallee EmitLoadOfMemberFunctionPointer(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * E, clang::CodeGen::Address This, llvm::Value *& ThisPtrForCall, llvm::Value * MemPtr, const clang::MemberPointerType * MPT)
  • public virtual llvm::Constant * EmitMemberDataPointer(const clang::MemberPointerType * MPT, clang::CharUnits offset)
  • public virtual llvm::Value * EmitMemberDataPointerAddress(clang::CodeGen::CodeGenFunction & CGF, const clang::Expr * E, clang::CodeGen::Address Base, llvm::Value * MemPtr, const clang::MemberPointerType * MPT)
  • public virtual llvm::Constant * EmitMemberFunctionPointer(const clang::CXXMethodDecl * MD)
  • public virtual llvm::Constant * EmitMemberPointer(const clang::APValue & MP, clang::QualType MPT)
  • public virtual llvm::Value * EmitMemberPointerComparison(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * L, llvm::Value * R, const clang::MemberPointerType * MPT, bool Inequality)
  • public virtual llvm::Constant * EmitMemberPointerConversion(const clang::CastExpr * E, llvm::Constant * Src)
  • public virtual llvm::Value * EmitMemberPointerConversion(clang::CodeGen::CodeGenFunction & CGF, const clang::CastExpr * E, llvm::Value * Src)
  • public virtual llvm::Value * EmitMemberPointerIsNotNull(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * MemPtr, const clang::MemberPointerType * MPT)
  • public virtual llvm::Constant * EmitNullMemberPointer(const clang::MemberPointerType * MPT)
  • public virtual void EmitReturnFromThunk(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::RValue RV, clang::QualType ResultType)
  • public virtual void EmitThreadLocalInitFuncs(clang::CodeGen::CodeGenModule & CGM, ArrayRef<const clang::VarDecl *> CXXThreadLocals, ArrayRef<llvm::Function *> CXXThreadLocalInits, ArrayRef<const clang::VarDecl *> CXXThreadLocalInitVars)
  • public virtual clang::CodeGen::LValue EmitThreadLocalVarDeclLValue(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl * VD, clang::QualType LValType)
  • public virtual llvm::Value * EmitTypeid(clang::CodeGen::CodeGenFunction & CGF, clang::QualType SrcRecordTy, clang::CodeGen::Address ThisPtr, llvm::Type * StdTypeInfoPtrTy)
  • public virtual llvm::Value * EmitVirtualDestructorCall(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXDestructorDecl * Dtor, clang::CXXDtorType DtorType, clang::CodeGen::Address This, clang::CodeGen::CGCXXABI::DeleteOrMemberCallExpr E)
  • protected void ErrorUnsupportedABI(clang::CodeGen::CodeGenFunction & CGF, llvm::StringRef S)
  • public virtual clang::CharUnits GetArrayCookieSize(const clang::CXXNewExpr * expr)
  • protected llvm::Constant * GetBogusMemberPointer(clang::QualType T)
  • public virtual llvm::StringRef GetDeletedVirtualCallName()
  • public virtual llvm::StringRef GetPureVirtualCallName()
  • public virtual llvm::Value * GetVirtualBaseClassOffset(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address This, const clang::CXXRecordDecl * ClassDecl, const clang::CXXRecordDecl * BaseClassDecl)
  • public virtual bool HasThisReturn(clang::GlobalDecl GD) const
  • public virtual clang::CodeGen::Address InitializeArrayCookie(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address NewPtr, llvm::Value * NumElements, const clang::CXXNewExpr * expr, clang::QualType ElementType)
  • public virtual std::pair<llvm::Value *, const CXXRecordDecl *> LoadVTablePtr(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address This, const clang::CXXRecordDecl * RD)
  • public virtual bool NeedsVTTParameter(clang::GlobalDecl GD)
  • public virtual void ReadArrayCookie(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address Ptr, const clang::CXXDeleteExpr * expr, clang::QualType ElementType, llvm::Value *& NumElements, llvm::Value *& AllocPtr, clang::CharUnits & CookieSize)
  • public clang::CodeGen::CGCXXABI::AddedStructorArgCounts addImplicitConstructorArgs(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXConstructorDecl * D, clang::CXXCtorType Type, bool ForVirtualBase, bool Delegating, clang::CodeGen::CallArgList & Args)
  • public virtual void addImplicitStructorParams(clang::CodeGen::CodeGenFunction & CGF, clang::QualType & ResTy, clang::CodeGen::FunctionArgList & Params)
  • public virtual void adjustCallArgsForDestructorThunk(clang::CodeGen::CodeGenFunction & CGF, clang::GlobalDecl GD, clang::CodeGen::CallArgList & CallArgs)
  • public virtual clang::CodeGen::Address adjustThisArgumentForVirtualFunctionCall(clang::CodeGen::CodeGenFunction & CGF, clang::GlobalDecl GD, clang::CodeGen::Address This, bool VirtualCall)
  • public virtual clang::CodeGen::CGCXXABI::AddedStructorArgCounts buildStructorSignature(clang::GlobalDecl GD, SmallVectorImpl<clang::CanQualType> & ArgTys)
  • public void buildThisParam(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::FunctionArgList & Params)
  • public virtual bool canCallMismatchedFunctionType() const
  • public virtual bool canSpeculativelyEmitVTable(const clang::CXXRecordDecl * RD) const
  • public virtual bool classifyReturnType(clang::CodeGen::CGFunctionInfo & FI) const
  • public virtual bool doStructorsInitializeVPtrs(const clang::CXXRecordDecl * VTableClass)
  • public virtual void emitBeginCatch(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXCatchStmt * C)
  • public virtual void emitCXXStructor(clang::GlobalDecl GD)
  • public virtual void emitRethrow(clang::CodeGen::CodeGenFunction & CGF, bool isNoReturn)
  • public virtual llvm::CallInst * emitTerminateForUnexpectedException(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * Exn)
  • public virtual void emitThrow(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXThrowExpr * E)
  • public virtual void emitVTableDefinitions(clang::CodeGen::CodeGenVTables & CGVT, const clang::CXXRecordDecl * RD)
  • public virtual void emitVirtualInheritanceTables(const clang::CXXRecordDecl * RD)
  • public virtual void emitVirtualObjectDelete(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXDeleteExpr * DE, clang::CodeGen::Address Ptr, clang::QualType ElementType, const clang::CXXDestructorDecl * Dtor)
  • public virtual bool exportThunk()
  • public virtual clang::CodeGen::CatchTypeInfo getAddrOfCXXCatchHandlerType(clang::QualType Ty, clang::QualType CatchHandlerType)
  • public virtual llvm::Constant * getAddrOfRTTIDescriptor(clang::QualType Ty)
  • public virtual llvm::GlobalVariable * getAddrOfVTable(const clang::CXXRecordDecl * RD, clang::CharUnits VPtrOffset)
  • protected virtual clang::CharUnits getArrayCookieSizeImpl(clang::QualType elementType)
  • public virtual llvm::Value * getCXXDestructorImplicitParam(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXDestructorDecl * DD, clang::CXXDtorType Type, bool ForVirtualBase, bool Delegating)
  • public virtual llvm::GlobalValue::LinkageTypes getCXXDestructorLinkage(clang::GVALinkage Linkage, const clang::CXXDestructorDecl * Dtor, clang::CXXDtorType DT) const
  • public virtual clang::CodeGen::CatchTypeInfo getCatchAllTypeInfo()
  • protected clang::ASTContext & getContext() const
  • public virtual clang::CodeGen::CGCXXABI::AddedStructorArgs getImplicitConstructorArgs(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXConstructorDecl * D, clang::CXXCtorType Type, bool ForVirtualBase, bool Delegating)
  • public clang::MangleContext & getMangleContext()
  • protected llvm::Constant * getMemberPointerAdjustment(const clang::CastExpr * E)
  • public virtual clang::CodeGen::CGCXXABI::RecordArgABI getRecordArgABI(const clang::CXXRecordDecl * RD) const
  • public virtual size_t getSrcArgforCopyCtor(const clang::CXXConstructorDecl *, clang::CodeGen::FunctionArgList & Args) const
  • protected clang::ImplicitParamDecl *& getStructorImplicitParamDecl(clang::CodeGen::CodeGenFunction & CGF)
  • protected llvm::Value *& getStructorImplicitParamValue(clang::CodeGen::CodeGenFunction & CGF)
  • protected clang::CodeGen::Address getThisAddress(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual const clang::CXXRecordDecl * getThisArgumentTypeForMethod(const clang::CXXMethodDecl * MD)
  • protected clang::ImplicitParamDecl * getThisDecl(clang::CodeGen::CodeGenFunction & CGF)
  • protected llvm::Value * getThisValue(clang::CodeGen::CodeGenFunction & CGF)
  • public virtual llvm::GlobalVariable * getThrowInfo(clang::QualType T)
  • public virtual std::vector<CharUnits> getVBPtrOffsets(const clang::CXXRecordDecl * RD)
  • public virtual llvm::Constant * getVTableAddressPoint(clang::BaseSubobject Base, const clang::CXXRecordDecl * VTableClass)
  • public virtual llvm::Constant * getVTableAddressPointForConstExpr(clang::BaseSubobject Base, const clang::CXXRecordDecl * VTableClass)
  • public virtual llvm::Value * getVTableAddressPointInStructor(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXRecordDecl * RD, clang::BaseSubobject Base, const clang::CXXRecordDecl * NearestVBase)
  • public virtual clang::CodeGen::CGCallee getVirtualFunctionPointer(clang::CodeGen::CodeGenFunction & CGF, clang::GlobalDecl GD, clang::CodeGen::Address This, llvm::Type * Ty, clang::SourceLocation Loc)
  • public virtual clang::CharUnits getVirtualFunctionPrologueThisAdjustment(clang::GlobalDecl GD)
  • public virtual bool hasMostDerivedReturn(clang::GlobalDecl GD) const
  • public virtual void initializeHiddenVirtualInheritanceMembers(clang::CodeGen::CodeGenFunction & CGF, const clang::CXXRecordDecl * RD)
  • protected bool isEmittedWithConstantInitializer(const clang::VarDecl * VD, bool InspectInitForWeakDef = false) const
  • public virtual bool isMemberPointerConvertible(const clang::MemberPointerType * MPT) const
  • public virtual bool isPermittedToBeHomogeneousAggregate(const clang::CXXRecordDecl * RD) const
  • public virtual bool isSRetParameterAfterThis() const
  • protected virtual bool isThisCompleteObject(clang::GlobalDecl GD) const
  • public virtual bool isVirtualOffsetNeededForVTableField(clang::CodeGen::CodeGenFunction & CGF, CodeGenFunction::VPtr Vptr)
  • public virtual bool isZeroInitializable(const clang::MemberPointerType * MPT)
  • protected llvm::Value * loadIncomingCXXThis(clang::CodeGen::CodeGenFunction & CGF)
  • protected bool mayNeedDestruction(const clang::VarDecl * VD) const
  • public virtual llvm::Value * performReturnAdjustment(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address Ret, const clang::ReturnAdjustment & RA)
  • public virtual llvm::Value * performThisAdjustment(clang::CodeGen::CodeGenFunction & CGF, clang::CodeGen::Address This, const clang::ThisAdjustment & TA)
  • protected virtual llvm::Value * readArrayCookieImpl(clang::CodeGen::CodeGenFunction & IGF, clang::CodeGen::Address ptr, clang::CharUnits cookieSize)
  • public virtual void registerGlobalDtor(clang::CodeGen::CodeGenFunction & CGF, const clang::VarDecl & D, llvm::FunctionCallee Dtor, llvm::Constant * Addr)
  • protected virtual bool requiresArrayCookie(const clang::CXXDeleteExpr * E, clang::QualType eltType)
  • protected virtual bool requiresArrayCookie(const clang::CXXNewExpr * E)
  • protected void setCXXABIThisValue(clang::CodeGen::CodeGenFunction & CGF, llvm::Value * ThisPtr)
  • public virtual void setCXXDestructorDLLStorage(llvm::GlobalValue * GV, const clang::CXXDestructorDecl * Dtor, clang::CXXDtorType DT) const
  • public virtual void setThunkLinkage(llvm::Function * Thunk, bool ForVTable, clang::GlobalDecl GD, bool ReturnAdjustment)
  • public virtual bool shouldDynamicCastCallBeNullChecked(bool SrcIsPtr, clang::QualType SrcRecordTy)
  • public virtual bool shouldTypeidBeNullChecked(bool IsDeref, clang::QualType SrcRecordTy)
  • public virtual bool useSinitAndSterm() const
  • public virtual bool useThunkForDtorVariant(const clang::CXXDestructorDecl * Dtor, clang::CXXDtorType DT) const
  • public virtual bool usesThreadWrapperFunction(const clang::VarDecl * VD) const
  • public virtual ~CGCXXABI()

Methods

CGCXXABI(clang::CodeGen::CodeGenModule& CGM)

Declared at: clang/lib/CodeGen/CGCXXABI.h:50

Parameters

clang::CodeGen::CodeGenModule& CGM

virtual llvm::Type* ConvertMemberPointerType(
    const clang::MemberPointerType* MPT)

Description

Find the LLVM type used to represent the given member pointer type.

Declared at: clang/lib/CodeGen/CGCXXABI.h:175

Parameters

const clang::MemberPointerType* MPT

virtual bool EmitBadCastCall(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:291

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual void EmitBadTypeidCall(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:273

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual void EmitCXXConstructors(
    const clang::CXXConstructorDecl* D)

Description

Emit constructor variants required by this ABI.

Declared at: clang/lib/CodeGen/CGCXXABI.h:308

Parameters

const clang::CXXConstructorDecl* D

virtual void EmitCXXDestructors(
    const clang::CXXDestructorDecl* D)

Description

Emit destructor variants required by this ABI.

Declared at: clang/lib/CodeGen/CGCXXABI.h:366

Parameters

const clang::CXXDestructorDecl* D

virtual llvm::BasicBlock*
EmitCtorCompleteObjectHandler(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXRecordDecl* RD)

Declared at: clang/lib/CodeGen/CGCXXABI.h:298

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXRecordDecl* RD

virtual void EmitDestructorCall(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXDestructorDecl* DD,
    clang::CXXDtorType Type,
    bool ForVirtualBase,
    bool Delegating,
    clang::CodeGen::Address This,
    clang::QualType ThisTy)

Description

Emit the destructor call.

Declared at: clang/lib/CodeGen/CGCXXABI.h:430

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXDestructorDecl* DD
clang::CXXDtorType Type
bool ForVirtualBase
bool Delegating
clang::CodeGen::Address This
clang::QualType ThisTy

virtual llvm::Value* EmitDynamicCastCall(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address Value,
    clang::QualType SrcRecordTy,
    clang::QualType DestTy,
    clang::QualType DestRecordTy,
    llvm::BasicBlock* CastEnd)

Declared at: clang/lib/CodeGen/CGCXXABI.h:282

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address Value
clang::QualType SrcRecordTy
clang::QualType DestTy
clang::QualType DestRecordTy
llvm::BasicBlock* CastEnd

virtual llvm::Value* EmitDynamicCastToVoid(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address Value,
    clang::QualType SrcRecordTy,
    clang::QualType DestTy)

Declared at: clang/lib/CodeGen/CGCXXABI.h:286

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address Value
clang::QualType SrcRecordTy
clang::QualType DestTy

virtual void EmitGuardedInit(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::VarDecl& D,
    llvm::GlobalVariable* DeclPtr,
    bool PerformInit)

Description

Emits the guarded initializer and destructor setup for the given variable, given that it couldn't be emitted as a constant. If \p PerformInit is false, the initialization has been folded to a constant and should not be performed. The variable may be: - a static local variable - a static data member of a class template instantiation

Declared at: clang/lib/CodeGen/CGCXXABI.h:601

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::VarDecl& D
llvm::GlobalVariable* DeclPtr
bool PerformInit

virtual void EmitInstanceFunctionProlog(
    clang::CodeGen::CodeGenFunction& CGF)

Description

Emit the ABI-specific prolog for the function.

Declared at: clang/lib/CodeGen/CGCXXABI.h:406

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual clang::CodeGen::CGCallee
EmitLoadOfMemberFunctionPointer(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::Expr* E,
    clang::CodeGen::Address This,
    llvm::Value*& ThisPtrForCall,
    llvm::Value* MemPtr,
    const clang::MemberPointerType* MPT)

Description

Load a member function from an object and a member function pointer. Apply the this-adjustment and set 'This' to the adjusted value.

Declared at: clang/lib/CodeGen/CGCXXABI.h:180

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::Expr* E
clang::CodeGen::Address This
llvm::Value*& ThisPtrForCall
llvm::Value* MemPtr
const clang::MemberPointerType* MPT

virtual llvm::Constant* EmitMemberDataPointer(
    const clang::MemberPointerType* MPT,
    clang::CharUnits offset)

Description

Create a member pointer for the given field.

Declared at: clang/lib/CodeGen/CGCXXABI.h:218

Parameters

const clang::MemberPointerType* MPT
clang::CharUnits offset

virtual llvm::Value* EmitMemberDataPointerAddress(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::Expr* E,
    clang::CodeGen::Address Base,
    llvm::Value* MemPtr,
    const clang::MemberPointerType* MPT)

Description

Calculate an l-value from an object and a data member pointer.

Declared at: clang/lib/CodeGen/CGCXXABI.h:187

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::Expr* E
clang::CodeGen::Address Base
llvm::Value* MemPtr
const clang::MemberPointerType* MPT

virtual llvm::Constant* EmitMemberFunctionPointer(
    const clang::CXXMethodDecl* MD)

Description

Create a member pointer for the given method.

Declared at: clang/lib/CodeGen/CGCXXABI.h:215

Parameters

const clang::CXXMethodDecl* MD

virtual llvm::Constant* EmitMemberPointer(
    const clang::APValue& MP,
    clang::QualType MPT)

Description

Create a member pointer for the given member pointer constant.

Declared at: clang/lib/CodeGen/CGCXXABI.h:222

Parameters

const clang::APValue& MP
clang::QualType MPT

virtual llvm::Value* EmitMemberPointerComparison(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Value* L,
    llvm::Value* R,
    const clang::MemberPointerType* MPT,
    bool Inequality)

Description

Emit a comparison between two member pointers. Returns an i1.

Declared at: clang/lib/CodeGen/CGCXXABI.h:226

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Value* L
llvm::Value* R
const clang::MemberPointerType* MPT
bool Inequality

virtual llvm::Constant*
EmitMemberPointerConversion(
    const clang::CastExpr* E,
    llvm::Constant* Src)

Description

Perform a derived-to-base, base-to-derived, or bitcast member pointer conversion on a constant value.

Declared at: clang/lib/CodeGen/CGCXXABI.h:199

Parameters

const clang::CastExpr* E
llvm::Constant* Src

virtual llvm::Value* EmitMemberPointerConversion(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CastExpr* E,
    llvm::Value* Src)

Description

Perform a derived-to-base, base-to-derived, or bitcast member pointer conversion.

Declared at: clang/lib/CodeGen/CGCXXABI.h:193

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CastExpr* E
llvm::Value* Src

virtual llvm::Value* EmitMemberPointerIsNotNull(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Value* MemPtr,
    const clang::MemberPointerType* MPT)

Description

Determine if a member pointer is non-null. Returns an i1.

Declared at: clang/lib/CodeGen/CGCXXABI.h:234

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Value* MemPtr
const clang::MemberPointerType* MPT

virtual llvm::Constant* EmitNullMemberPointer(
    const clang::MemberPointerType* MPT)

Description

Create a null member pointer of the given type.

Declared at: clang/lib/CodeGen/CGCXXABI.h:212

Parameters

const clang::MemberPointerType* MPT

virtual void EmitReturnFromThunk(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::RValue RV,
    clang::QualType ResultType)

Declared at: clang/lib/CodeGen/CGCXXABI.h:507

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::RValue RV
clang::QualType ResultType

virtual void EmitThreadLocalInitFuncs(
    clang::CodeGen::CodeGenModule& CGM,
    ArrayRef<const clang::VarDecl*>
        CXXThreadLocals,
    ArrayRef<llvm::Function*> CXXThreadLocalInits,
    ArrayRef<const clang::VarDecl*>
        CXXThreadLocalInitVars)

Description

Emits ABI-required functions necessary to initialize thread_local variables in this translation unit.

Declared at: clang/lib/CodeGen/CGCXXABI.h:625

Parameters

clang::CodeGen::CodeGenModule& CGM
ArrayRef<const clang::VarDecl*> CXXThreadLocals
- The thread_local declarations in this translation unit.
ArrayRef<llvm::Function*> CXXThreadLocalInits
- If this translation unit contains any non-constant initialization or non-trivial destruction for thread_local variables, a list of functions to perform the initialization.
ArrayRef<const clang::VarDecl*> CXXThreadLocalInitVars

virtual clang::CodeGen::LValue
EmitThreadLocalVarDeclLValue(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::VarDecl* VD,
    clang::QualType LValType)

Description

Emit a reference to a non-local thread_local variable (including triggering the initialization of all thread_local variables in its translation unit).

Declared at: clang/lib/CodeGen/CGCXXABI.h:637

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::VarDecl* VD
clang::QualType LValType

virtual llvm::Value* EmitTypeid(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::QualType SrcRecordTy,
    clang::CodeGen::Address ThisPtr,
    llvm::Type* StdTypeInfoPtrTy)

Declared at: clang/lib/CodeGen/CGCXXABI.h:274

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::QualType SrcRecordTy
clang::CodeGen::Address ThisPtr
llvm::Type* StdTypeInfoPtrTy

virtual llvm::Value* EmitVirtualDestructorCall(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXDestructorDecl* Dtor,
    clang::CXXDtorType DtorType,
    clang::CodeGen::Address This,
    clang::CodeGen::CGCXXABI::
        DeleteOrMemberCallExpr E)

Description

Emit the ABI-specific virtual destructor call.

Declared at: clang/lib/CodeGen/CGCXXABI.h:480

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXDestructorDecl* Dtor
clang::CXXDtorType DtorType
clang::CodeGen::Address This
clang::CodeGen::CGCXXABI::DeleteOrMemberCallExpr E

void ErrorUnsupportedABI(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::StringRef S)

Description

Issue a diagnostic about unsupported features in the ABI.

Declared at: clang/lib/CodeGen/CGCXXABI.h:68

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::StringRef S

virtual clang::CharUnits GetArrayCookieSize(
    const clang::CXXNewExpr* expr)

Description

Returns the extra size required in order to store the array cookie for the given new-expression. May return 0 to indicate that no array cookie is required. Several cases are filtered out before this method is called: - non-array allocations never need a cookie - calls to :: operator new(size_t, void*) never need a cookie

Declared at: clang/lib/CodeGen/CGCXXABI.h:533

Parameters

const clang::CXXNewExpr* expr
- the new-expression being allocated.

llvm::Constant* GetBogusMemberPointer(
    clang::QualType T)

Description

Get a null value for unsupported member pointers.

Declared at: clang/lib/CodeGen/CGCXXABI.h:71

Parameters

clang::QualType T

virtual llvm::StringRef
GetDeletedVirtualCallName()

Description

Gets the deleted virtual member call name.

Declared at: clang/lib/CodeGen/CGCXXABI.h:520

virtual llvm::StringRef GetPureVirtualCallName()

Description

Gets the pure virtual member call function.

Declared at: clang/lib/CodeGen/CGCXXABI.h:517

virtual llvm::Value* GetVirtualBaseClassOffset(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address This,
    const clang::CXXRecordDecl* ClassDecl,
    const clang::CXXRecordDecl* BaseClassDecl)

Declared at: clang/lib/CodeGen/CGCXXABI.h:293

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address This
const clang::CXXRecordDecl* ClassDecl
const clang::CXXRecordDecl* BaseClassDecl

virtual bool HasThisReturn(
    clang::GlobalDecl GD) const

Description

Returns true if the given constructor or destructor is one of the kinds that the ABI says returns 'this' (only applies when called non-virtually for destructors). There currently is no way to indicate if a destructor returns 'this' when called virtually, and code generation does not support the case.

Declared at: clang/lib/CodeGen/CGCXXABI.h:123

Parameters

clang::GlobalDecl GD

virtual clang::CodeGen::Address
InitializeArrayCookie(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address NewPtr,
    llvm::Value* NumElements,
    const clang::CXXNewExpr* expr,
    clang::QualType ElementType)

Description

Initialize the array cookie for the given allocation.

Declared at: clang/lib/CodeGen/CGCXXABI.h:544

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address NewPtr
- a char* which is the presumed-non-null return value of the allocation function
llvm::Value* NumElements
- the computed number of elements, potentially collapsed from the multidimensional array case; always a size_t
const clang::CXXNewExpr* expr
clang::QualType ElementType
- the base element allocated type, i.e. the allocated type after stripping all array types

virtual std::pair<llvm::Value*,
                  const CXXRecordDecl*>
LoadVTablePtr(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address This,
    const clang::CXXRecordDecl* RD)

Description

Load a vtable from This, an object of polymorphic type RD, or from one of its virtual bases if it does not have its own vtable. Returns the vtable and the class from which the vtable was loaded.

Declared at: clang/lib/CodeGen/CGCXXABI.h:649

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address This
const clang::CXXRecordDecl* RD

virtual bool NeedsVTTParameter(
    clang::GlobalDecl GD)

Description

Return whether the given global decl needs a VTT parameter.

Declared at: clang/lib/CodeGen/CGCXXABI.h:569

Parameters

clang::GlobalDecl GD

virtual void ReadArrayCookie(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address Ptr,
    const clang::CXXDeleteExpr* expr,
    clang::QualType ElementType,
    llvm::Value*& NumElements,
    llvm::Value*& AllocPtr,
    clang::CharUnits& CookieSize)

Description

Reads the array cookie associated with the given pointer, if it has one.

Declared at: clang/lib/CodeGen/CGCXXABI.h:563

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address Ptr
- a pointer to the first element in the array
const clang::CXXDeleteExpr* expr
clang::QualType ElementType
- the base element type of elements of the array
llvm::Value*& NumElements
- an out parameter which will be initialized with the number of elements allocated, or zero if there is no cookie
llvm::Value*& AllocPtr
- an out parameter which will be initialized with a char* pointing to the address returned by the allocation function
clang::CharUnits& CookieSize
- an out parameter which will be initialized with the size of the cookie, or zero if there is no cookie

clang::CodeGen::CGCXXABI::AddedStructorArgCounts
addImplicitConstructorArgs(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXConstructorDecl* D,
    clang::CXXCtorType Type,
    bool ForVirtualBase,
    bool Delegating,
    clang::CodeGen::CallArgList& Args)

Description

Add any ABI-specific implicit arguments needed to call a constructor.

Declared at: clang/lib/CodeGen/CGCXXABI.h:418

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXConstructorDecl* D
clang::CXXCtorType Type
bool ForVirtualBase
bool Delegating
clang::CodeGen::CallArgList& Args

Returns

The number of arguments added at the beginning and end of the call, which is typically zero or one.

virtual void addImplicitStructorParams(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::QualType& ResTy,
    clang::CodeGen::FunctionArgList& Params)

Description

Insert any ABI-specific implicit parameters into the parameter list for a function. This generally involves extra data for constructors and destructors. ABIs may also choose to override the return type, which has been initialized with the type of 'this' if HasThisReturn(CGF.CurGD) is true or the formal return type of the function otherwise.

Declared at: clang/lib/CodeGen/CGCXXABI.h:396

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::QualType& ResTy
clang::CodeGen::FunctionArgList& Params

virtual void adjustCallArgsForDestructorThunk(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::GlobalDecl GD,
    clang::CodeGen::CallArgList& CallArgs)

Declared at: clang/lib/CodeGen/CGCXXABI.h:486

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::GlobalDecl GD
clang::CodeGen::CallArgList& CallArgs

virtual clang::CodeGen::Address
adjustThisArgumentForVirtualFunctionCall(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::GlobalDecl GD,
    clang::CodeGen::Address This,
    bool VirtualCall)

Description

Perform ABI-specific "this" argument adjustment required prior to a call of a virtual function. The "VirtualCall" argument is true iff the call itself is virtual.

Declared at: clang/lib/CodeGen/CGCXXABI.h:381

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::GlobalDecl GD
clang::CodeGen::Address This
bool VirtualCall

virtual clang::CodeGen::CGCXXABI::
    AddedStructorArgCounts
    buildStructorSignature(
        clang::GlobalDecl GD,
        SmallVectorImpl<clang::CanQualType>&
            ArgTys)

Description

Build the signature of the given constructor or destructor variant by adding any required parameters. For convenience, ArgTys has been initialized with the type of 'this'.

Declared at: clang/lib/CodeGen/CGCXXABI.h:348

Parameters

clang::GlobalDecl GD
SmallVectorImpl<clang::CanQualType>& ArgTys

void buildThisParam(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::FunctionArgList& Params)

Description

Build a parameter variable suitable for 'this'.

Declared at: clang/lib/CodeGen/CGCXXABI.h:387

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::FunctionArgList& Params

virtual bool canCallMismatchedFunctionType() const

Description

Returns true if the target allows calling a function through a pointer with a different signature than the actual function (or equivalently, bitcasting a function or function pointer to a different function type). In principle in the most general case this could depend on the target, the calling convention, and the actual types of the arguments and return value. Here it just means whether the signature mismatch could *ever* be allowed; in other words, does the target do strict checking of signatures for all calls.

Declared at: clang/lib/CodeGen/CGCXXABI.h:137

virtual bool canSpeculativelyEmitVTable(
    const clang::CXXRecordDecl* RD) const

Description

Determine whether it's possible to emit a vtable for \p RD, even though we do not know that the vtable has been marked as used by semantic analysis.

Declared at: clang/lib/CodeGen/CGCXXABI.h:258

Parameters

const clang::CXXRecordDecl* RD

virtual bool classifyReturnType(
    clang::CodeGen::CGFunctionInfo& FI) const

Description

If the C++ ABI requires the given type be returned in a particular way, this method sets RetAI and returns true.

Declared at: clang/lib/CodeGen/CGCXXABI.h:141

Parameters

clang::CodeGen::CGFunctionInfo& FI

virtual bool doStructorsInitializeVPtrs(
    const clang::CXXRecordDecl* VTableClass)

Description

Checks if ABI requires to initialize vptrs for given dynamic class.

Declared at: clang/lib/CodeGen/CGCXXABI.h:445

Parameters

const clang::CXXRecordDecl* VTableClass

virtual void emitBeginCatch(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXCatchStmt* C)

Declared at: clang/lib/CodeGen/CGCXXABI.h:260

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXCatchStmt* C

virtual void emitCXXStructor(clang::GlobalDecl GD)

Description

Emit a single constructor/destructor with the given type from a C++ constructor Decl.

Declared at: clang/lib/CodeGen/CGCXXABI.h:643

Parameters

clang::GlobalDecl GD

virtual void emitRethrow(
    clang::CodeGen::CodeGenFunction& CGF,
    bool isNoReturn)

Declared at: clang/lib/CodeGen/CGCXXABI.h:251

Parameters

clang::CodeGen::CodeGenFunction& CGF
bool isNoReturn

virtual llvm::CallInst*
emitTerminateForUnexpectedException(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Value* Exn)

Declared at: clang/lib/CodeGen/CGCXXABI.h:263

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Value* Exn

virtual void emitThrow(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXThrowExpr* E)

Declared at: clang/lib/CodeGen/CGCXXABI.h:252

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXThrowExpr* E

virtual void emitVTableDefinitions(
    clang::CodeGen::CodeGenVTables& CGVT,
    const clang::CXXRecordDecl* RD)

Description

Emits the VTable definitions required for the given record type.

Declared at: clang/lib/CodeGen/CGCXXABI.h:436

Parameters

clang::CodeGen::CodeGenVTables& CGVT
const clang::CXXRecordDecl* RD

virtual void emitVirtualInheritanceTables(
    const clang::CXXRecordDecl* RD)

Description

Emit any tables needed to implement virtual inheritance. For Itanium, this emits virtual table tables. For the MSVC++ ABI, this emits virtual base tables.

Declared at: clang/lib/CodeGen/CGCXXABI.h:493

Parameters

const clang::CXXRecordDecl* RD

virtual void emitVirtualObjectDelete(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXDeleteExpr* DE,
    clang::CodeGen::Address Ptr,
    clang::QualType ElementType,
    const clang::CXXDestructorDecl* Dtor)

Declared at: clang/lib/CodeGen/CGCXXABI.h:247

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXDeleteExpr* DE
clang::CodeGen::Address Ptr
clang::QualType ElementType
const clang::CXXDestructorDecl* Dtor

virtual bool exportThunk()

Declared at: clang/lib/CodeGen/CGCXXABI.h:495

virtual clang::CodeGen::CatchTypeInfo
getAddrOfCXXCatchHandlerType(
    clang::QualType Ty,
    clang::QualType CatchHandlerType)

Declared at: clang/lib/CodeGen/CGCXXABI.h:268

Parameters

clang::QualType Ty
clang::QualType CatchHandlerType

virtual llvm::Constant* getAddrOfRTTIDescriptor(
    clang::QualType Ty)

Declared at: clang/lib/CodeGen/CGCXXABI.h:266

Parameters

clang::QualType Ty

virtual llvm::GlobalVariable* getAddrOfVTable(
    const clang::CXXRecordDecl* RD,
    clang::CharUnits VPtrOffset)

Description

Get the address of the vtable for the given record decl which should be used for the vptr at the given offset in RD.

Declared at: clang/lib/CodeGen/CGCXXABI.h:467

Parameters

const clang::CXXRecordDecl* RD
clang::CharUnits VPtrOffset

virtual clang::CharUnits getArrayCookieSizeImpl(
    clang::QualType elementType)

Description

Returns the extra size required in order to store the array cookie for the given type. Assumes that an array cookie is required.

Declared at: clang/lib/CodeGen/CGCXXABI.h:575

Parameters

clang::QualType elementType

virtual llvm::Value*
getCXXDestructorImplicitParam(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXDestructorDecl* DD,
    clang::CXXDtorType Type,
    bool ForVirtualBase,
    bool Delegating)

Description

Get the implicit (second) parameter that comes after the "this" pointer, or nullptr if there is isn't one.

Declared at: clang/lib/CodeGen/CGCXXABI.h:425

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXDestructorDecl* DD
clang::CXXDtorType Type
bool ForVirtualBase
bool Delegating

virtual llvm::GlobalValue::LinkageTypes
getCXXDestructorLinkage(
    clang::GVALinkage Linkage,
    const clang::CXXDestructorDecl* Dtor,
    clang::CXXDtorType DT) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:362

Parameters

clang::GVALinkage Linkage
const clang::CXXDestructorDecl* Dtor
clang::CXXDtorType DT

virtual clang::CodeGen::CatchTypeInfo
getCatchAllTypeInfo()

Declared at: clang/lib/CodeGen/CGCXXABI.h:269

clang::ASTContext& getContext() const

Declared at: clang/lib/CodeGen/CGCXXABI.h:85

virtual clang::CodeGen::CGCXXABI::
    AddedStructorArgs
    getImplicitConstructorArgs(
        clang::CodeGen::CodeGenFunction& CGF,
        const clang::CXXConstructorDecl* D,
        clang::CXXCtorType Type,
        bool ForVirtualBase,
        bool Delegating)

Declared at: clang/lib/CodeGen/CGCXXABI.h:409

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXConstructorDecl* D
clang::CXXCtorType Type
bool ForVirtualBase
bool Delegating

clang::MangleContext& getMangleContext()

Description

Gets the mangle context.

Declared at: clang/lib/CodeGen/CGCXXABI.h:113

llvm::Constant* getMemberPointerAdjustment(
    const clang::CastExpr* E)

Description

A utility method for computing the offset required for the given base-to-derived or derived-to-base member-pointer conversion. Does not handle virtual conversions (in case we ever fully support an ABI that allows this). Returns null if no adjustment is required.

Declared at: clang/lib/CodeGen/CGCXXABI.h:244

Parameters

const clang::CastExpr* E

virtual clang::CodeGen::CGCXXABI::RecordArgABI
getRecordArgABI(
    const clang::CXXRecordDecl* RD) const

Description

Returns how an argument of the given record type should be passed.

Declared at: clang/lib/CodeGen/CGCXXABI.h:159

Parameters

const clang::CXXRecordDecl* RD

virtual size_t getSrcArgforCopyCtor(
    const clang::CXXConstructorDecl*,
    clang::CodeGen::FunctionArgList& Args) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:510

Parameters

const clang::CXXConstructorDecl*
clang::CodeGen::FunctionArgList& Args

clang::ImplicitParamDecl*&
getStructorImplicitParamDecl(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:73

Parameters

clang::CodeGen::CodeGenFunction& CGF

llvm::Value*& getStructorImplicitParamValue(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:76

Parameters

clang::CodeGen::CodeGenFunction& CGF

clang::CodeGen::Address getThisAddress(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:60

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual const clang::CXXRecordDecl*
getThisArgumentTypeForMethod(
    const clang::CXXMethodDecl* MD)

Description

Get the type of the implicit "this" parameter used by a method. May return zero if no specific type is applicable, e.g. if the ABI expects the "this" parameter to point to some artificial offset in a complete object due to vbases being reordered.

Declared at: clang/lib/CodeGen/CGCXXABI.h:373

Parameters

const clang::CXXMethodDecl* MD

clang::ImplicitParamDecl* getThisDecl(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:54

Parameters

clang::CodeGen::CodeGenFunction& CGF

llvm::Value* getThisValue(
    clang::CodeGen::CodeGenFunction& CGF)

Declared at: clang/lib/CodeGen/CGCXXABI.h:57

Parameters

clang::CodeGen::CodeGenFunction& CGF

virtual llvm::GlobalVariable* getThrowInfo(
    clang::QualType T)

Declared at: clang/lib/CodeGen/CGCXXABI.h:253

Parameters

clang::QualType T

virtual std::vector<CharUnits> getVBPtrOffsets(
    const clang::CXXRecordDecl* RD)

Description

Gets the offsets of all the virtual base pointers in a given class.

Declared at: clang/lib/CodeGen/CGCXXABI.h:514

Parameters

const clang::CXXRecordDecl* RD

virtual llvm::Constant* getVTableAddressPoint(
    clang::BaseSubobject Base,
    const clang::CXXRecordDecl* VTableClass)

Description

Get the address point of the vtable for the given base subobject.

Declared at: clang/lib/CodeGen/CGCXXABI.h:449

Parameters

clang::BaseSubobject Base
const clang::CXXRecordDecl* VTableClass

virtual llvm::Constant*
getVTableAddressPointForConstExpr(
    clang::BaseSubobject Base,
    const clang::CXXRecordDecl* VTableClass)

Description

Get the address point of the vtable for the given base subobject while building a constexpr.

Declared at: clang/lib/CodeGen/CGCXXABI.h:462

Parameters

clang::BaseSubobject Base
const clang::CXXRecordDecl* VTableClass

virtual llvm::Value*
getVTableAddressPointInStructor(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXRecordDecl* RD,
    clang::BaseSubobject Base,
    const clang::CXXRecordDecl* NearestVBase)

Description

Get the address point of the vtable for the given base subobject while building a constructor or a destructor.

Declared at: clang/lib/CodeGen/CGCXXABI.h:455

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXRecordDecl* RD
clang::BaseSubobject Base
const clang::CXXRecordDecl* NearestVBase

virtual clang::CodeGen::CGCallee
getVirtualFunctionPointer(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::GlobalDecl GD,
    clang::CodeGen::Address This,
    llvm::Type* Ty,
    clang::SourceLocation Loc)

Description

Build a virtual function pointer in the ABI-specific way.

Declared at: clang/lib/CodeGen/CGCXXABI.h:471

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::GlobalDecl GD
clang::CodeGen::Address This
llvm::Type* Ty
clang::SourceLocation Loc

virtual clang::CharUnits
getVirtualFunctionPrologueThisAdjustment(
    clang::GlobalDecl GD)

Description

Get the ABI-specific "this" parameter adjustment to apply in the prologue of a virtual function.

Declared at: clang/lib/CodeGen/CGCXXABI.h:401

Parameters

clang::GlobalDecl GD

virtual bool hasMostDerivedReturn(
    clang::GlobalDecl GD) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:125

Parameters

clang::GlobalDecl GD

virtual void
initializeHiddenVirtualInheritanceMembers(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::CXXRecordDecl* RD)

Description

Emit the code to initialize hidden members required to handle virtual inheritance, if needed by the ABI.

Declared at: clang/lib/CodeGen/CGCXXABI.h:304

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::CXXRecordDecl* RD

bool isEmittedWithConstantInitializer(
    const clang::VarDecl* VD,
    bool InspectInitForWeakDef = false) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:96

Parameters

const clang::VarDecl* VD
bool InspectInitForWeakDef = false

virtual bool isMemberPointerConvertible(
    const clang::MemberPointerType* MPT) const

Description

Return whether or not a member pointers type is convertible to an IR type.

Declared at: clang/lib/CodeGen/CGCXXABI.h:207

Parameters

const clang::MemberPointerType* MPT

virtual bool isPermittedToBeHomogeneousAggregate(
    const clang::CXXRecordDecl* RD) const

Description

Returns true if the ABI permits the argument to be a homogeneous aggregate.

Declared at: clang/lib/CodeGen/CGCXXABI.h:168

Parameters

const clang::CXXRecordDecl* RD

virtual bool isSRetParameterAfterThis() const

Description

Returns true if the implicit 'sret' parameter comes after the implicit 'this' parameter of C++ instance methods.

Declared at: clang/lib/CodeGen/CGCXXABI.h:163

virtual bool isThisCompleteObject(
    clang::GlobalDecl GD) const

Description

Determine whether there's something special about the rules of the ABI tell us that 'this' is a complete object within the given function. Obvious common logic like being defined on a final class will have been taken care of by the caller.

Declared at: clang/lib/CodeGen/CGCXXABI.h:106

Parameters

clang::GlobalDecl GD

virtual bool isVirtualOffsetNeededForVTableField(
    clang::CodeGen::CodeGenFunction& CGF,
    CodeGenFunction::VPtr Vptr)

Description

Checks if ABI requires extra virtual offset for vtable field.

Declared at: clang/lib/CodeGen/CGCXXABI.h:441

Parameters

clang::CodeGen::CodeGenFunction& CGF
CodeGenFunction::VPtr Vptr

virtual bool isZeroInitializable(
    const clang::MemberPointerType* MPT)

Description

Return true if the given member pointer can be zero-initialized (in the C++ sense) with an LLVM zeroinitializer.

Declared at: clang/lib/CodeGen/CGCXXABI.h:204

Parameters

const clang::MemberPointerType* MPT

llvm::Value* loadIncomingCXXThis(
    clang::CodeGen::CodeGenFunction& CGF)

Description

Loads the incoming C++ this pointer as it was passed by the caller.

Declared at: clang/lib/CodeGen/CGCXXABI.h:81

Parameters

clang::CodeGen::CodeGenFunction& CGF

bool mayNeedDestruction(
    const clang::VarDecl* VD) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:87

Parameters

const clang::VarDecl* VD

virtual llvm::Value* performReturnAdjustment(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address Ret,
    const clang::ReturnAdjustment& RA)

Declared at: clang/lib/CodeGen/CGCXXABI.h:503

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address Ret
const clang::ReturnAdjustment& RA

virtual llvm::Value* performThisAdjustment(
    clang::CodeGen::CodeGenFunction& CGF,
    clang::CodeGen::Address This,
    const clang::ThisAdjustment& TA)

Declared at: clang/lib/CodeGen/CGCXXABI.h:499

Parameters

clang::CodeGen::CodeGenFunction& CGF
clang::CodeGen::Address This
const clang::ThisAdjustment& TA

virtual llvm::Value* readArrayCookieImpl(
    clang::CodeGen::CodeGenFunction& IGF,
    clang::CodeGen::Address ptr,
    clang::CharUnits cookieSize)

Description

Reads the array cookie for an allocation which is known to have one. This is called by the standard implementation of ReadArrayCookie. Other parameters are as above.

Declared at: clang/lib/CodeGen/CGCXXABI.h:586

Parameters

clang::CodeGen::CodeGenFunction& IGF
clang::CodeGen::Address ptr
- a pointer to the allocation made for an array, as a char*
clang::CharUnits cookieSize
- the computed cookie size of an array

Returns

a size_t

virtual void registerGlobalDtor(
    clang::CodeGen::CodeGenFunction& CGF,
    const clang::VarDecl& D,
    llvm::FunctionCallee Dtor,
    llvm::Constant* Addr)

Description

Emit code to force the execution of a destructor during global teardown. The default implementation of this uses atexit.

Declared at: clang/lib/CodeGen/CGCXXABI.h:610

Parameters

clang::CodeGen::CodeGenFunction& CGF
const clang::VarDecl& D
llvm::FunctionCallee Dtor
- a function taking a single pointer argument
llvm::Constant* Addr
- a pointer to pass to the destructor function.

virtual bool requiresArrayCookie(
    const clang::CXXDeleteExpr* E,
    clang::QualType eltType)

Declared at: clang/lib/CodeGen/CGCXXABI.h:99

Parameters

const clang::CXXDeleteExpr* E
clang::QualType eltType

virtual bool requiresArrayCookie(
    const clang::CXXNewExpr* E)

Declared at: clang/lib/CodeGen/CGCXXABI.h:100

Parameters

const clang::CXXNewExpr* E

void setCXXABIThisValue(
    clang::CodeGen::CodeGenFunction& CGF,
    llvm::Value* ThisPtr)

Declared at: clang/lib/CodeGen/CGCXXABI.h:83

Parameters

clang::CodeGen::CodeGenFunction& CGF
llvm::Value* ThisPtr

virtual void setCXXDestructorDLLStorage(
    llvm::GlobalValue* GV,
    const clang::CXXDestructorDecl* Dtor,
    clang::CXXDtorType DT) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:357

Parameters

llvm::GlobalValue* GV
const clang::CXXDestructorDecl* Dtor
clang::CXXDtorType DT

virtual void setThunkLinkage(
    llvm::Function* Thunk,
    bool ForVTable,
    clang::GlobalDecl GD,
    bool ReturnAdjustment)

Declared at: clang/lib/CodeGen/CGCXXABI.h:496

Parameters

llvm::Function* Thunk
bool ForVTable
clang::GlobalDecl GD
bool ReturnAdjustment

virtual bool shouldDynamicCastCallBeNullChecked(
    bool SrcIsPtr,
    clang::QualType SrcRecordTy)

Declared at: clang/lib/CodeGen/CGCXXABI.h:278

Parameters

bool SrcIsPtr
clang::QualType SrcRecordTy

virtual bool shouldTypeidBeNullChecked(
    bool IsDeref,
    clang::QualType SrcRecordTy)

Declared at: clang/lib/CodeGen/CGCXXABI.h:271

Parameters

bool IsDeref
clang::QualType SrcRecordTy

virtual bool useSinitAndSterm() const

Declared at: clang/lib/CodeGen/CGCXXABI.h:127

virtual bool useThunkForDtorVariant(
    const clang::CXXDestructorDecl* Dtor,
    clang::CXXDtorType DT) const

Description

Returns true if the given destructor type should be emitted as a linkonce delegating thunk, regardless of whether the dtor is defined in this TU or not.

Declared at: clang/lib/CodeGen/CGCXXABI.h:354

Parameters

const clang::CXXDestructorDecl* Dtor
clang::CXXDtorType DT

virtual bool usesThreadWrapperFunction(
    const clang::VarDecl* VD) const

Declared at: clang/lib/CodeGen/CGCXXABI.h:632

Parameters

const clang::VarDecl* VD

virtual ~CGCXXABI()

Declared at: clang/lib/CodeGen/CGCXXABI.h:110