clang 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
clang::CodeGen::CodeGenFunction Class Reference

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CodeGenFunction.h"

Inheritance diagram for clang::CodeGen::CodeGenFunction:
Inheritance graph
[legend]

Classes

class  AbstractCallee
 An abstract representation of regular/ObjC call/message targets. More...
 
struct  AllocaTrackerRAII
 
class  ArrayInitLoopExprScope
 The scope of an ArrayInitLoopExpr. More...
 
class  AutoVarEmission
 
struct  AwaitSuspendWrapperInfo
 
class  CallLifetimeEnd
 
class  CGCapturedStmtInfo
 API for captured statement code generation. More...
 
class  CGCapturedStmtRAII
 RAII for correct setting/restoring of CapturedStmtInfo. More...
 
struct  CGCoroInfo
 
class  CGFPOptionsRAII
 
struct  CleanupDeactivationScope
 
class  ConditionalEvaluation
 An object to manage conditionally-evaluated expressions. More...
 
class  ConstantEmission
 
struct  CXXDefaultArgExprScope
 
class  CXXDefaultInitExprScope
 The scope of a CXXDefaultInitExpr. More...
 
struct  DeferredDeactivateCleanup
 
class  FieldConstructionScope
 A scope within which we are constructing the fields of an object which might use a CXXDefaultInitExpr. More...
 
class  FinallyInfo
 A class controlling the emission of a finally block. More...
 
class  InlinedInheritingConstructorScope
 
struct  JumpDest
 A jump destination is an abstract label, branching to which may require a jump out through normal cleanups. More...
 
class  LexicalScope
 
struct  LifetimeExtendedCleanupHeader
 Header for data within LifetimeExtendedCleanupStack. More...
 
struct  MultiVersionResolverOption
 
struct  OMPBuilderCBHelpers
 
class  OMPCancelStackRAII
 Controls insertion of cancellation exit blocks in worksharing constructs. More...
 
class  OMPLocalDeclMapRAII
 Save/restore original map of previously emitted local vars in case when we need to duplicate emission of the same code several times in the same function for OpenMP code. More...
 
class  OMPMapVars
 The class used to assign some variables some temporarily addresses. More...
 
class  OMPPrivateScope
 The scope used to remap some variables as private in the OpenMP loop body (or other captured region emitted without outlining), and to restore old vars back on exit. More...
 
struct  OMPTargetDataInfo
 
class  OpaqueValueMapping
 An RAII object to set (and then clear) a mapping for an OpaqueValueExpr. More...
 
class  OpaqueValueMappingData
 A non-RAII class containing all the information about a bound opaque value. More...
 
class  ParamValue
 
class  ParentLoopDirectiveForScanRegion
 Manages parent directive for scan directives. More...
 
class  PeepholeProtection
 An object which temporarily prevents a value from being destroyed by aggressive peephole optimizations that assume that all uses of a value have been realized in the IR. More...
 
struct  PrototypeWrapper
 
class  RunCleanupsScope
 Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More...
 
class  SanitizerScope
 RAII object to set/unset CodeGenFunction::IsSanitizerScope. More...
 
class  StmtExprEvaluation
 An RAII object to record that we're evaluating a statement expression. More...
 
struct  VlaSizePair
 
struct  VPtr
 Struct with all information about dynamic [sub]class needed to set vptr. More...
 

Public Types

enum class  VTableAuthMode { Authenticate , MustTrap , UnsafeUbsanStrip }
 
enum  CFITypeCheckKind {
  CFITCK_VCall , CFITCK_NVCall , CFITCK_DerivedCast , CFITCK_UnrelatedCast ,
  CFITCK_ICall , CFITCK_NVMFCall , CFITCK_VMFCall
}
 
enum  TypeCheckKind {
  TCK_Load , TCK_Store , TCK_ReferenceBinding , TCK_MemberAccess ,
  TCK_MemberCall , TCK_ConstructorCall , TCK_DowncastPointer , TCK_DowncastReference ,
  TCK_Upcast , TCK_UpcastToVirtualBase , TCK_NonnullAssign , TCK_DynamicOperation
}
 Situations in which we might emit a check for the suitability of a pointer or glvalue. More...
 
enum  ExprValueKind { EVK_RValue , EVK_NonRValue }
 
enum class  GuardKind { VariableGuard , TlsGuard }
 
enum  { NotSubtraction = false , IsSubtraction = true }
 An enumeration which makes it easier to specify whether or not an operation is a subtraction. More...
 
enum  BuiltinCheckKind { BCK_CTZPassedZero , BCK_CLZPassedZero }
 Specifies which type of sanitizer check to apply when handling a particular builtin. More...
 
enum class  EvaluationOrder { Default , ForceLeftToRight , ForceRightToLeft }
 
typedef std::pair< llvm::Value *, llvm::Value * > ComplexPairTy
 
typedef llvm::function_ref< void(CodeGenFunction &, const OMPLoopDirective &, JumpDest)> CodeGenLoopTy
 
typedef llvm::function_ref< void(CodeGenFunction &, SourceLocation, const unsigned, const bool)> CodeGenOrderedTy
 
typedef llvm::function_ref< std::pair< LValue, LValue >(CodeGenFunction &, const OMPExecutableDirective &S)> CodeGenLoopBoundsTy
 
typedef llvm::function_ref< std::pair< llvm::Value *, llvm::Value * >(CodeGenFunction &, const OMPExecutableDirective &S, Address LB, Address UB)> CodeGenDispatchBoundsTy
 
typedef llvm::DenseMap< const Decl *, AddressDeclMapTy
 
using SourceLocExprScopeGuard = CurrentSourceLocExprScope::SourceLocExprScopeGuard
 
typedef void Destroyer(CodeGenFunction &CGF, Address addr, QualType ty)
 
typedef llvm::SmallVector< VPtr, 4 > VPtrsVector
 
typedef llvm::SmallPtrSet< const CXXRecordDecl *, 4 > VisitedVirtualBasesSetTy
 
typedef void SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address)
 
typedef const llvm::function_ref< void(CodeGenFunction &, llvm::Function *, const OMPTaskDataTy &)> TaskGenTy
 

Public Member Functions

void InsertHelper (llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock::iterator InsertPt) const
 CGBuilder insert helper.
 
bool isCoroutine () const
 
bool inSuspendBlock () const
 
llvm::Function * generateAwaitSuspendWrapper (Twine const &CoroName, Twine const &SuspendPointName, CoroutineSuspendExpr const &S)
 
bool hasLabelBeenSeenInCurrentScope () const
 Return true if a label was seen in the current scope.
 
llvm::Instruction * getPostAllocaInsertPoint ()
 Return PostAllocaInsertPt.
 
bool checkIfFunctionMustProgress ()
 Returns true if a function must make progress, which means the mustprogress attribute can be added.
 
bool checkIfLoopMustProgress (const Expr *, bool HasEmptyBody)
 Returns true if a loop must make progress, which means the mustprogress attribute can be added.
 
llvm::BasicBlock * EmitLandingPad ()
 Emits a landing pad for the current EH stack.
 
llvm::BasicBlock * getInvokeDestImpl ()
 
template<class T >
DominatingValue< T >::saved_type saveValueInCond (T value)
 
bool isSEHTryScope () const
 Returns true inside SEH __try blocks.
 
bool isCleanupPadScope () const
 Returns true while emitting a cleanuppad.
 
template<class T , class... As>
void pushFullExprCleanup (CleanupKind kind, As... A)
 pushFullExprCleanup - Push a cleanup to be run at the end of the current full-expression.
 
template<class T , class... As>
void pushCleanupAfterFullExpr (CleanupKind Kind, As... A)
 Queue a cleanup to be pushed after finishing the current full-expression, potentially with an active flag.
 
template<class T , class... As>
void pushCleanupAfterFullExprWithActiveFlag (CleanupKind Kind, RawAddress ActiveFlag, As... A)
 
template<class T , class... As>
void pushCleanupAndDeferDeactivation (CleanupKind Kind, As... A)
 
void initFullExprCleanup ()
 Set up the last cleanup that was pushed as a conditional full-expression cleanup.
 
void initFullExprCleanupWithFlag (RawAddress ActiveFlag)
 
RawAddress createCleanupActiveFlag ()
 
void PushDestructorCleanup (QualType T, Address Addr)
 PushDestructorCleanup - Push a cleanup to call the complete-object destructor of an object of the given type at the given address.
 
void PushDestructorCleanup (const CXXDestructorDecl *Dtor, QualType T, Address Addr)
 PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address.
 
void PopCleanupBlock (bool FallThroughIsBranchThrough=false, bool ForDeactivation=false)
 PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.
 
void DeactivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 DeactivateCleanupBlock - Deactivates the given cleanup block.
 
void ActivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 ActivateCleanupBlock - Activates an initially-inactive cleanup.
 
void PopCleanupBlocks (EHScopeStack::stable_iterator OldCleanupStackSize, std::initializer_list< llvm::Value ** > ValuesToReload={})
 Takes the old cleanup stack size and emits the cleanup blocks that have been added.
 
void PopCleanupBlocks (EHScopeStack::stable_iterator OldCleanupStackSize, size_t OldLifetimeExtendedStackSize, std::initializer_list< llvm::Value ** > ValuesToReload={})
 Takes the old cleanup stack size and emits the cleanup blocks that have been added, then adds all lifetime-extended cleanups from the given position to the stack.
 
void ResolveBranchFixups (llvm::BasicBlock *Target)
 
JumpDest getJumpDestInCurrentScope (llvm::BasicBlock *Target)
 The given basic block lies in the current EH scope, but may be a target of a potentially scope-crossing jump; get a stable handle to which we can perform this jump later.
 
JumpDest getJumpDestInCurrentScope (StringRef Name=StringRef())
 The given basic block lies in the current EH scope, but may be a target of a potentially scope-crossing jump; get a stable handle to which we can perform this jump later.
 
void EmitBranchThroughCleanup (JumpDest Dest)
 EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to.
 
bool isObviouslyBranchWithoutCleanups (JumpDest Dest) const
 isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run.
 
void popCatchScope ()
 popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves).
 
llvm::BasicBlock * getEHResumeBlock (bool isCleanup)
 
llvm::BasicBlock * getEHDispatchBlock (EHScopeStack::stable_iterator scope)
 
llvm::BasicBlock * getFuncletEHDispatchBlock (EHScopeStack::stable_iterator scope)
 
bool isInConditionalBranch () const
 isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.
 
void setBeforeOutermostConditional (llvm::Value *value, Address addr, CodeGenFunction &CGF)
 
void incrementProfileCounter (const Stmt *S, llvm::Value *StepV=nullptr)
 Increment the profiler's counter for the given statement by StepV.
 
bool isMCDCCoverageEnabled () const
 
void maybeCreateMCDCCondBitmap ()
 Allocate a temp value on the stack that MCDC can use to track condition results.
 
bool isBinaryLogicalOp (const Expr *E) const
 
void maybeResetMCDCCondBitmap (const Expr *E)
 Zero-init the MCDC temp value.
 
void maybeUpdateMCDCTestVectorBitmap (const Expr *E)
 Increment the profiler's counter for the given expression by StepV.
 
void maybeUpdateMCDCCondBitmap (const Expr *E, llvm::Value *Val)
 Update the MCDC temp value with the condition's evaluated result.
 
uint64_t getProfileCount (const Stmt *S)
 Get the profiler's count for the given statement.
 
void setCurrentProfileCount (uint64_t Count)
 Set the profiler's current count.
 
uint64_t getCurrentProfileCount ()
 Get the profiler's current count.
 
 CodeGenFunction (CodeGenModule &cgm, bool suppressNewContext=false)
 
 ~CodeGenFunction ()
 
CodeGenTypesgetTypes () const
 
ASTContextgetContext () const
 
CGDebugInfogetDebugInfo ()
 
void disableDebugInfo ()
 
void enableDebugInfo ()
 
bool shouldUseFusedARCCalls ()
 
const LangOptionsgetLangOpts () const
 
Address getExceptionSlot ()
 Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.
 
Address getEHSelectorSlot ()
 
llvm::Value * getExceptionFromSlot ()
 Returns the contents of the function's exception object and selector slots.
 
llvm::Value * getSelectorFromSlot ()
 
RawAddress getNormalCleanupDestSlot ()
 
llvm::BasicBlock * getUnreachableBlock ()
 
llvm::BasicBlock * getInvokeDest ()
 
bool currentFunctionUsesSEHTry () const
 
const TargetInfogetTarget () const
 
llvm::LLVMContext & getLLVMContext ()
 
const TargetCodeGenInfogetTargetHooks () const
 
void pushIrregularPartialArrayCleanup (llvm::Value *arrayBegin, Address arrayEndPointer, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer)
 
void pushRegularPartialArrayCleanup (llvm::Value *arrayBegin, llvm::Value *arrayEnd, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer)
 
void pushDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 
void pushEHDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 
void pushDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 
void pushDestroyAndDeferDeactivation (QualType::DestructionKind dtorKind, Address addr, QualType type)
 
void pushDestroyAndDeferDeactivation (CleanupKind cleanupKind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 
void pushLifetimeExtendedDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 
void pushCallObjectDeleteCleanup (const FunctionDecl *OperatorDelete, llvm::Value *CompletePtr, QualType ElementType)
 
void pushStackRestore (CleanupKind kind, Address SPMem)
 
void pushKmpcAllocFree (CleanupKind Kind, std::pair< llvm::Value *, llvm::Value * > AddrSizePair)
 
void emitDestroy (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 
llvm::Function * generateDestroyHelper (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray, const VarDecl *VD)
 
void emitArrayDestroy (llvm::Value *begin, llvm::Value *end, QualType elementType, CharUnits elementAlign, Destroyer *destroyer, bool checkZeroLength, bool useEHCleanup)
 
DestroyergetDestroyer (QualType::DestructionKind destructionKind)
 
bool needsEHCleanup (QualType::DestructionKind kind)
 Determines whether an EH cleanup is required to destroy a type with the given destruction kind.
 
CleanupKind getCleanupKind (QualType::DestructionKind kind)
 
void GenerateObjCMethod (const ObjCMethodDecl *OMD)
 
void StartObjCMethod (const ObjCMethodDecl *MD, const ObjCContainerDecl *CD)
 
void GenerateObjCGetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID)
 GenerateObjCGetter - Synthesize an Objective-C property getter function.
 
void generateObjCGetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, const ObjCMethodDecl *GetterMothodDecl, llvm::Constant *AtomicHelperFn)
 
void GenerateObjCCtorDtorMethod (ObjCImplementationDecl *IMP, ObjCMethodDecl *MD, bool ctor)
 
void GenerateObjCSetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID)
 GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.
 
void generateObjCSetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, llvm::Constant *AtomicHelperFn)
 
llvm::Value * EmitBlockLiteral (const BlockExpr *)
 Emit block literal.
 
llvm::Function * GenerateBlockFunction (GlobalDecl GD, const CGBlockInfo &Info, const DeclMapTy &ldm, bool IsLambdaConversionToBlock, bool BuildGlobalBlock)
 
llvm::Constant * GenerateCopyHelperFunction (const CGBlockInfo &blockInfo)
 
llvm::Constant * GenerateDestroyHelperFunction (const CGBlockInfo &blockInfo)
 
llvm::Constant * GenerateObjCAtomicSetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
 
llvm::Constant * GenerateObjCAtomicGetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
 
llvm::Value * EmitBlockCopyAndAutorelease (llvm::Value *Block, QualType Ty)
 
void BuildBlockRelease (llvm::Value *DeclPtr, BlockFieldFlags flags, bool CanThrow)
 
void emitByrefStructureInit (const AutoVarEmission &emission)
 
void enterByrefCleanup (CleanupKind Kind, Address Addr, BlockFieldFlags Flags, bool LoadBlockVarAddr, bool CanThrow)
 Enter a cleanup to destroy a __block variable.
 
void setBlockContextParameter (const ImplicitParamDecl *D, unsigned argNum, llvm::Value *ptr)
 
Address LoadBlockStruct ()
 
Address GetAddrOfBlockDecl (const VarDecl *var)
 
Address emitBlockByrefAddress (Address baseAddr, const VarDecl *V, bool followForward=true)
 BuildBlockByrefAddress - Computes the location of the data in a variable which is declared as __block.
 
Address emitBlockByrefAddress (Address baseAddr, const BlockByrefInfo &info, bool followForward, const llvm::Twine &name)
 
const BlockByrefInfogetBlockByrefInfo (const VarDecl *var)
 
QualType BuildFunctionArgList (GlobalDecl GD, FunctionArgList &Args)
 
void GenerateCode (GlobalDecl GD, llvm::Function *Fn, const CGFunctionInfo &FnInfo)
 
void markAsIgnoreThreadCheckingAtRuntime (llvm::Function *Fn)
 Annotate the function with an attribute that disables TSan checking at runtime.
 
void StartFunction (GlobalDecl GD, QualType RetTy, llvm::Function *Fn, const CGFunctionInfo &FnInfo, const FunctionArgList &Args, SourceLocation Loc=SourceLocation(), SourceLocation StartLoc=SourceLocation())
 Emit code for the start of a function.
 
void EmitConstructorBody (FunctionArgList &Args)
 
void EmitDestructorBody (FunctionArgList &Args)
 
void emitImplicitAssignmentOperatorBody (FunctionArgList &Args)
 
void EmitFunctionBody (const Stmt *Body)
 
void EmitBlockWithFallThrough (llvm::BasicBlock *BB, const Stmt *S)
 
void EmitForwardingCallToLambda (const CXXMethodDecl *LambdaCallOperator, CallArgList &CallArgs, const CGFunctionInfo *CallOpFnInfo=nullptr, llvm::Constant *CallOpFn=nullptr)
 
void EmitLambdaBlockInvokeBody ()
 
void EmitLambdaStaticInvokeBody (const CXXMethodDecl *MD)
 
void EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD, CallArgList &CallArgs)
 
void EmitLambdaInAllocaImplFn (const CXXMethodDecl *CallOp, const CGFunctionInfo **ImplFnInfo, llvm::Function **ImplFn)
 
void EmitLambdaInAllocaCallOpBody (const CXXMethodDecl *MD)
 
void EmitLambdaVLACapture (const VariableArrayType *VAT, LValue LV)
 
void EmitAsanPrologueOrEpilogue (bool Prologue)
 
llvm::DebugLoc EmitReturnBlock ()
 Emit the unified return block, trying to avoid its emission when possible.
 
void FinishFunction (SourceLocation EndLoc=SourceLocation())
 FinishFunction - Complete IR generation of the current function.
 
void StartThunk (llvm::Function *Fn, GlobalDecl GD, const CGFunctionInfo &FnInfo, bool IsUnprototyped)
 
void EmitCallAndReturnForThunk (llvm::FunctionCallee Callee, const ThunkInfo *Thunk, bool IsUnprototyped)
 
void FinishThunk ()
 
void EmitMustTailThunk (GlobalDecl GD, llvm::Value *AdjustedThisPtr, llvm::FunctionCallee Callee)
 Emit a musttail call for a thunk with a potentially adjusted this pointer.
 
void generateThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk, bool IsUnprototyped)
 Generate a thunk for the given method.
 
llvm::Function * GenerateVarArgsThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk)
 
void EmitCtorPrologue (const CXXConstructorDecl *CD, CXXCtorType Type, FunctionArgList &Args)
 
void EmitInitializerForField (FieldDecl *Field, LValue LHS, Expr *Init)
 
void InitializeVTablePointer (const VPtr &vptr)
 Initialize the vtable pointer of the given subobject.
 
VPtrsVector getVTablePointers (const CXXRecordDecl *VTableClass)
 
void getVTablePointers (BaseSubobject Base, const CXXRecordDecl *NearestVBase, CharUnits OffsetFromNearestVBase, bool BaseIsNonVirtualPrimaryBase, const CXXRecordDecl *VTableClass, VisitedVirtualBasesSetTy &VBases, VPtrsVector &vptrs)
 
void InitializeVTablePointers (const CXXRecordDecl *ClassDecl)
 
llvm::Value * GetVTablePtr (Address This, llvm::Type *VTableTy, const CXXRecordDecl *VTableClass, VTableAuthMode AuthMode=VTableAuthMode::Authenticate)
 GetVTablePtr - Return the Value of the vtable pointer member pointed to by This.
 
void EmitVTablePtrCheckForCast (QualType T, Address Derived, bool MayBeNull, CFITypeCheckKind TCK, SourceLocation Loc)
 Derived is the presumed address of an object of type T after a cast.
 
void EmitVTablePtrCheckForCall (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc)
 EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable.
 
void EmitVTablePtrCheck (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc)
 EmitVTablePtrCheck - Emit a check that VTable is a valid virtual table for RD using llvm.type.test.
 
void EmitTypeMetadataCodeForVCall (const CXXRecordDecl *RD, llvm::Value *VTable, SourceLocation Loc)
 If whole-program virtual table optimization is enabled, emit an assumption that VTable is a member of RD's type identifier.
 
bool ShouldEmitVTableTypeCheckedLoad (const CXXRecordDecl *RD)
 Returns whether we should perform a type checked load when loading a virtual function for virtual calls to members of RD.
 
llvm::Value * EmitVTableTypeCheckedLoad (const CXXRecordDecl *RD, llvm::Value *VTable, llvm::Type *VTableTy, uint64_t VTableByteOffset)
 Emit a type checked load from the given vtable.
 
void EnterDtorCleanups (const CXXDestructorDecl *Dtor, CXXDtorType Type)
 EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor.
 
bool ShouldInstrumentFunction ()
 ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.
 
bool ShouldSkipSanitizerInstrumentation ()
 ShouldSkipSanitizerInstrumentation - Return true if the current function should not be instrumented with sanitizers.
 
bool ShouldXRayInstrumentFunction () const
 ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds.
 
bool AlwaysEmitXRayCustomEvents () const
 AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls.
 
bool AlwaysEmitXRayTypedEvents () const
 AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls.
 
llvm::ConstantInt * getUBSanFunctionTypeHash (QualType T) const
 Return a type hash constant for a function instrumented by -fsanitize=function.
 
void EmitFunctionProlog (const CGFunctionInfo &FI, llvm::Function *Fn, const FunctionArgList &Args)
 EmitFunctionProlog - Emit the target specific LLVM code to load the arguments for the given function.
 
void EmitFunctionEpilog (const CGFunctionInfo &FI, bool EmitRetDbgLoc, SourceLocation EndLoc)
 EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.
 
void EmitReturnValueCheck (llvm::Value *RV)
 Emit a test that checks if the return value RV is nonnull.
 
void EmitStartEHSpec (const Decl *D)
 EmitStartEHSpec - Emit the start of the exception spec.
 
void EmitEndEHSpec (const Decl *D)
 EmitEndEHSpec - Emit the end of the exception spec.
 
llvm::BasicBlock * getTerminateLandingPad ()
 getTerminateLandingPad - Return a landing pad that just calls terminate.
 
llvm::BasicBlock * getTerminateFunclet ()
 getTerminateLandingPad - Return a cleanup funclet that just calls terminate.
 
llvm::BasicBlock * getTerminateHandler ()
 getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate.
 
llvm::Type * ConvertTypeForMem (QualType T)
 
llvm::Type * ConvertType (QualType T)
 
llvm::Type * convertTypeForLoadStore (QualType ASTTy, llvm::Type *LLVMTy=nullptr)
 
llvm::Type * ConvertType (const TypeDecl *T)
 
llvm::Value * LoadObjCSelf ()
 LoadObjCSelf - Load the value of self.
 
QualType TypeOfSelfObject ()
 TypeOfSelfObject - Return type of object that this self represents.
 
llvm::BasicBlock * createBasicBlock (const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr)
 createBasicBlock - Create an LLVM basic block.
 
JumpDest getJumpDestForLabel (const LabelDecl *S)
 getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
 
void SimplifyForwardingBlocks (llvm::BasicBlock *BB)
 SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it.
 
void EmitBlock (llvm::BasicBlock *BB, bool IsFinished=false)
 EmitBlock - Emit the given block.
 
void EmitBlockAfterUses (llvm::BasicBlock *BB)
 EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it.
 
void EmitBranch (llvm::BasicBlock *Block)
 EmitBranch - Emit a branch to the specified basic block from the current insert block, taking care to avoid creation of branches from dummy blocks.
 
bool HaveInsertPoint () const
 HaveInsertPoint - True if an insertion point is defined.
 
void EnsureInsertPoint ()
 EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go.
 
void ErrorUnsupported (const Stmt *S, const char *Type)
 ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.
 
Address mergeAddressesInConditionalExpr (Address LHS, Address RHS, llvm::BasicBlock *LHSBlock, llvm::BasicBlock *RHSBlock, llvm::BasicBlock *MergeBlock, QualType MergedType)
 
Address makeNaturalAddressForPointer (llvm::Value *Ptr, QualType T, CharUnits Alignment=CharUnits::Zero(), bool ForPointeeType=false, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 Construct an address with the natural alignment of T.
 
LValue MakeAddrLValue (Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
 
LValue MakeAddrLValue (Address Addr, QualType T, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo)
 
LValue MakeAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source=AlignmentSource::Type)
 
LValue MakeRawAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source=AlignmentSource::Type)
 Same as MakeAddrLValue above except that the pointer is known to be unsigned.
 
LValue MakeAddrLValueWithoutTBAA (Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
 
LValue MakeNaturalAlignPointeeAddrLValue (llvm::Value *V, QualType T)
 Given a value of type T* that may not be to a complete object, construct an l-value with the natural pointee alignment of T.
 
LValue MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 
LValue MakeNaturalAlignPointeeRawAddrLValue (llvm::Value *V, QualType T)
 Same as MakeNaturalAlignPointeeAddrLValue except that the pointer is known to be unsigned.
 
LValue MakeNaturalAlignRawAddrLValue (llvm::Value *V, QualType T)
 
Address EmitLoadOfReference (LValue RefLVal, LValueBaseInfo *PointeeBaseInfo=nullptr, TBAAAccessInfo *PointeeTBAAInfo=nullptr)
 
LValue EmitLoadOfReferenceLValue (LValue RefLVal)
 
LValue EmitLoadOfReferenceLValue (Address RefAddr, QualType RefTy, AlignmentSource Source=AlignmentSource::Type)
 
Address EmitLoadOfPointer (Address Ptr, const PointerType *PtrTy, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 Load a pointer with type PtrTy stored at address Ptr.
 
LValue EmitLoadOfPointerLValue (Address Ptr, const PointerType *PtrTy)
 
llvm::AllocaInst * CreateTempAlloca (llvm::Type *Ty, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr)
 CreateTempAlloca - This creates an alloca and inserts it into the entry block if ArraySize is nullptr, otherwise inserts it at the current insertion point of the builder.
 
RawAddress CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, RawAddress *Alloca=nullptr)
 
RawAddress CreateTempAllocaWithoutCast (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr)
 
RawAddress CreateDefaultAlignTempAlloca (llvm::Type *Ty, const Twine &Name="tmp")
 CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type.
 
RawAddress CreateIRTemp (QualType T, const Twine &Name="tmp")
 CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment.
 
RawAddress CreateMemTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space.
 
RawAddress CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
 
RawAddress CreateMemTempWithoutCast (QualType T, const Twine &Name="tmp")
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.
 
RawAddress CreateMemTempWithoutCast (QualType T, CharUnits Align, const Twine &Name="tmp")
 
AggValueSlot CreateAggTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
 CreateAggTemp - Create a temporary memory object for the given aggregate type.
 
llvm::Value * EvaluateExprAsBool (const Expr *E)
 EvaluateExprAsBool - Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value.
 
llvm::Value * EmitWithOriginalRHSBitfieldAssignment (const BinaryOperator *E, llvm::Value **Previous, QualType *SrcType)
 Retrieve the implicit cast expression of the rhs in a binary operator expression by passing pointers to Value and QualType This is used for implicit bitfield conversion checks, which must compare with the value before potential truncation.
 
void EmitBitfieldConversionCheck (llvm::Value *Src, QualType SrcType, llvm::Value *Dst, QualType DstType, const CGBitFieldInfo &Info, SourceLocation Loc)
 Emit a check that an [implicit] conversion of a bitfield.
 
void EmitIgnoredExpr (const Expr *E)
 EmitIgnoredExpr - Emit an expression in a context which ignores the result.
 
RValue EmitAnyExpr (const Expr *E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
 EmitAnyExpr - Emit code to compute the specified expression which can have any type.
 
Address EmitVAListRef (const Expr *E)
 
Address EmitMSVAListRef (const Expr *E)
 Emit a "reference" to a __builtin_ms_va_list; this is always the value of the expression, because a __builtin_ms_va_list is a pointer to a char.
 
RValue EmitAnyExprToTemp (const Expr *E)
 EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.
 
void EmitAnyExprToMem (const Expr *E, Address Location, Qualifiers Quals, bool IsInitializer)
 EmitAnyExprToMem - Emits the code necessary to evaluate an arbitrary expression into the given memory location.
 
void EmitAnyExprToExn (const Expr *E, Address Addr)
 
void EmitExprAsInit (const Expr *init, const ValueDecl *D, LValue lvalue, bool capturedByInit)
 EmitExprAsInit - Emits the code necessary to initialize a location in memory with the given initializer.
 
bool hasVolatileMember (QualType T)
 hasVolatileMember - returns true if aggregate type has a volatile member.
 
AggValueSlot::Overlap_t getOverlapForReturnValue ()
 Determine whether a return value slot may overlap some other object.
 
AggValueSlot::Overlap_t getOverlapForFieldInit (const FieldDecl *FD)
 Determine whether a field initialization may overlap some other object.
 
AggValueSlot::Overlap_t getOverlapForBaseInit (const CXXRecordDecl *RD, const CXXRecordDecl *BaseRD, bool IsVirtual)
 Determine whether a base class initialization may overlap some other object.
 
void EmitAggregateAssign (LValue Dest, LValue Src, QualType EltTy)
 Emit an aggregate assignment.
 
void EmitAggregateCopyCtor (LValue Dest, LValue Src, AggValueSlot::Overlap_t MayOverlap)
 
void EmitAggregateCopy (LValue Dest, LValue Src, QualType EltTy, AggValueSlot::Overlap_t MayOverlap, bool isVolatile=false)
 EmitAggregateCopy - Emit an aggregate copy.
 
Address GetAddrOfLocalVar (const VarDecl *VD)
 GetAddrOfLocalVar - Return the address of a local variable.
 
LValue getOrCreateOpaqueLValueMapping (const OpaqueValueExpr *e)
 Given an opaque value expression, return its LValue mapping if it exists, otherwise create one.
 
RValue getOrCreateOpaqueRValueMapping (const OpaqueValueExpr *e)
 Given an opaque value expression, return its RValue mapping if it exists, otherwise create one.
 
llvm::Value * getArrayInitIndex ()
 Get the index of the current ArrayInitLoopExpr, if any.
 
llvm::BlockAddress * GetAddrOfLabel (const LabelDecl *L)
 
llvm::BasicBlock * GetIndirectGotoBlock ()
 
void EmitNullInitialization (Address DestPtr, QualType Ty)
 EmitNullInitialization - Generate code to set a value of the given type to null, If the type contains data member pointers, they will be initialized to -1 in accordance with the Itanium C++ ABI.
 
llvm::Value * EmitVAStartEnd (llvm::Value *ArgValue, bool IsStart)
 Emits a call to an LLVM variable-argument intrinsic, either llvm.va_start or llvm.va_end.
 
RValue EmitVAArg (VAArgExpr *VE, Address &VAListAddr, AggValueSlot Slot=AggValueSlot::ignored())
 Generate code to get an argument from the passed in pointer and update it accordingly.
 
llvm::Value * emitArrayLength (const ArrayType *arrayType, QualType &baseType, Address &addr)
 emitArrayLength - Compute the length of an array, even if it's a VLA, and drill down to the base element type.
 
void EmitVariablyModifiedType (QualType Ty)
 EmitVLASize - Capture all the sizes for the VLA expressions in the given variably-modified type and store them in the VLASizeMap.
 
VlaSizePair getVLAElements1D (const VariableArrayType *vla)
 Return the number of elements for a single dimension for the given array type.
 
VlaSizePair getVLAElements1D (QualType vla)
 
VlaSizePair getVLASize (const VariableArrayType *vla)
 Returns an LLVM value that corresponds to the size, in non-variably-sized elements, of a variable length array type, plus that largest non-variably-sized element type.
 
VlaSizePair getVLASize (QualType vla)
 
llvm::Value * LoadCXXThis ()
 LoadCXXThis - Load the value of 'this'.
 
Address LoadCXXThisAddress ()
 
llvm::Value * LoadCXXVTT ()
 LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
 
Address GetAddressOfDirectBaseInCompleteClass (Address Value, const CXXRecordDecl *Derived, const CXXRecordDecl *Base, bool BaseIsVirtual)
 GetAddressOfBaseOfCompleteClass - Convert the given pointer to a complete class to the given direct base.
 
Address GetAddressOfBaseClass (Address Value, const CXXRecordDecl *Derived, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd, bool NullCheckValue, SourceLocation Loc)
 GetAddressOfBaseClass - This function will add the necessary delta to the load of 'this' and returns address of the base class.
 
Address GetAddressOfDerivedClass (Address Value, const CXXRecordDecl *Derived, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd, bool NullCheckValue)
 
llvm::Value * GetVTTParameter (GlobalDecl GD, bool ForVirtualBase, bool Delegating)
 GetVTTParameter - Return the VTT parameter that should be passed to a base constructor/destructor with virtual bases.
 
void EmitDelegateCXXConstructorCall (const CXXConstructorDecl *Ctor, CXXCtorType CtorType, const FunctionArgList &Args, SourceLocation Loc)
 
void EmitDelegatingCXXConstructorCall (const CXXConstructorDecl *Ctor, const FunctionArgList &Args)
 
void EmitInlinedInheritingCXXConstructorCall (const CXXConstructorDecl *Ctor, CXXCtorType CtorType, bool ForVirtualBase, bool Delegating, CallArgList &Args)
 Emit a call to an inheriting constructor (that is, one that invokes a constructor inherited from a base class) by inlining its definition.
 
void EmitInheritedCXXConstructorCall (const CXXConstructorDecl *D, bool ForVirtualBase, Address This, bool InheritedFromVBase, const CXXInheritedCtorInitExpr *E)
 Emit a call to a constructor inherited from a base class, passing the current constructor's arguments along unmodified (without even making a copy).
 
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, AggValueSlot ThisAVS, const CXXConstructExpr *E)
 
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, CallArgList &Args, AggValueSlot::Overlap_t Overlap, SourceLocation Loc, bool NewPointerIsChecked)
 
void EmitVTableAssumptionLoads (const CXXRecordDecl *ClassDecl, Address This)
 Emit assumption load for all bases.
 
void EmitVTableAssumptionLoad (const VPtr &vptr, Address This)
 Emit assumption that vptr load == global vtable.
 
void EmitSynthesizedCXXCopyCtorCall (const CXXConstructorDecl *D, Address This, Address Src, const CXXConstructExpr *E)
 
void EmitCXXAggrConstructorCall (const CXXConstructorDecl *D, const ArrayType *ArrayTy, Address ArrayPtr, const CXXConstructExpr *E, bool NewPointerIsChecked, bool ZeroInitialization=false)
 
void EmitCXXAggrConstructorCall (const CXXConstructorDecl *D, llvm::Value *NumElements, Address ArrayPtr, const CXXConstructExpr *E, bool NewPointerIsChecked, bool ZeroInitialization=false)
 
void EmitCXXDestructorCall (const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating, Address This, QualType ThisTy)
 
void EmitNewArrayInitializer (const CXXNewExpr *E, QualType elementType, llvm::Type *ElementTy, Address NewPtr, llvm::Value *NumElements, llvm::Value *AllocSizeWithoutCookie)
 
void EmitCXXTemporary (const CXXTemporary *Temporary, QualType TempType, Address Ptr)
 
void EmitSehCppScopeBegin ()
 
void EmitSehCppScopeEnd ()
 
void EmitSehTryScopeBegin ()
 
void EmitSehTryScopeEnd ()
 
llvm::Value * EmitLifetimeStart (llvm::TypeSize Size, llvm::Value *Addr)
 
void EmitLifetimeEnd (llvm::Value *Size, llvm::Value *Addr)
 
llvm::Value * EmitCXXNewExpr (const CXXNewExpr *E)
 
void EmitCXXDeleteExpr (const CXXDeleteExpr *E)
 
void EmitDeleteCall (const FunctionDecl *DeleteFD, llvm::Value *Ptr, QualType DeleteTy, llvm::Value *NumElements=nullptr, CharUnits CookieSize=CharUnits())
 
RValue EmitBuiltinNewDeleteCall (const FunctionProtoType *Type, const CallExpr *TheCallExpr, bool IsDelete)
 
llvm::Value * EmitCXXTypeidExpr (const CXXTypeidExpr *E)
 
llvm::Value * EmitDynamicCast (Address V, const CXXDynamicCastExpr *DCE)
 
Address EmitCXXUuidofExpr (const CXXUuidofExpr *E)
 
bool sanitizePerformTypeCheck () const
 Whether any type-checking sanitizers are enabled.
 
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, LValue LV, QualType Type, SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
 
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, Address Addr, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
 
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
 Emit a check that V is the address of storage of the appropriate size and alignment for an object of type Type (or if ArraySize is provided, for an array of that bound).
 
void EmitBoundsCheck (const Expr *E, const Expr *Base, llvm::Value *Index, QualType IndexType, bool Accessed)
 Emit a check that Base points into an array object, which we can access at index Index.
 
void EmitBoundsCheckImpl (const Expr *E, llvm::Value *Bound, llvm::Value *Index, QualType IndexType, QualType IndexedType, bool Accessed)
 
const FieldDeclFindFlexibleArrayMemberFieldAndOffset (ASTContext &Ctx, const RecordDecl *RD, const FieldDecl *FAMDecl, uint64_t &Offset)
 
llvm::Value * EmitLoadOfCountedByField (const Expr *Base, const FieldDecl *FAMDecl, const FieldDecl *CountDecl)
 Build an expression accessing the "counted_by" field.
 
llvm::Value * EmitScalarPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
 
ComplexPairTy EmitComplexPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
 
llvm::DebugLoc SourceLocToDebugLoc (SourceLocation Location)
 Converts Location to a DebugLoc, if debug information is enabled.
 
unsigned getDebugInfoFIndex (const RecordDecl *Rec, unsigned FieldIndex)
 Get the record field index as represented in debug info.
 
void EmitDecl (const Decl &D)
 EmitDecl - Emit a declaration.
 
void EmitVarDecl (const VarDecl &D)
 EmitVarDecl - Emit a local variable declaration.
 
void EmitScalarInit (const Expr *init, const ValueDecl *D, LValue lvalue, bool capturedByInit)
 
bool isTrivialInitializer (const Expr *Init)
 Determine whether the given initializer is trivial in the sense that it requires no code to be generated.
 
void EmitAutoVarDecl (const VarDecl &D)
 EmitAutoVarDecl - Emit an auto variable declaration.
 
AutoVarEmission EmitAutoVarAlloca (const VarDecl &var)
 
void EmitAutoVarInit (const AutoVarEmission &emission)
 
void EmitAutoVarCleanups (const AutoVarEmission &emission)
 
void emitAutoVarTypeCleanup (const AutoVarEmission &emission, QualType::DestructionKind dtorKind)
 
void EmitAndRegisterVariableArrayDimensions (CGDebugInfo *DI, const VarDecl &D, bool EmitDebugInfo)
 Emits the alloca and debug information for the size expressions for each dimension of an array.
 
void EmitStaticVarDecl (const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage)
 
void EmitParmDecl (const VarDecl &D, ParamValue Arg, unsigned ArgNo)
 EmitParmDecl - Emit a ParmVarDecl or an ImplicitParamDecl.
 
PeepholeProtection protectFromPeepholes (RValue rvalue)
 protectFromPeepholes - Protect a value that we're intending to store to the side, but which will probably be used later, from aggressive peepholing optimizations that might delete it.
 
void unprotectFromPeepholes (PeepholeProtection protection)
 
void emitAlignmentAssumptionCheck (llvm::Value *Ptr, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue, llvm::Value *TheCheck, llvm::Instruction *Assumption)
 
void emitAlignmentAssumption (llvm::Value *PtrValue, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr)
 
void emitAlignmentAssumption (llvm::Value *PtrValue, const Expr *E, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr)
 
void EmitStopPoint (const Stmt *S)
 EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.
 
void EmitStmt (const Stmt *S, ArrayRef< const Attr * > Attrs=std::nullopt)
 EmitStmt - Emit the code for the statement.
 
bool EmitSimpleStmt (const Stmt *S, ArrayRef< const Attr * > Attrs)
 EmitSimpleStmt - Try to emit a "simple" statement which does not necessarily require an insertion point or debug information; typically because the statement amounts to a jump or a container of other statements.
 
Address EmitCompoundStmt (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored())
 
Address EmitCompoundStmtWithoutScope (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored())
 
void EmitLabel (const LabelDecl *D)
 EmitLabel - Emit the block for the given label.
 
void EmitLabelStmt (const LabelStmt &S)
 
void EmitAttributedStmt (const AttributedStmt &S)
 
void EmitGotoStmt (const GotoStmt &S)
 
void EmitIndirectGotoStmt (const IndirectGotoStmt &S)
 
void EmitIfStmt (const IfStmt &S)
 
void EmitWhileStmt (const WhileStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt)
 
void EmitDoStmt (const DoStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt)
 
void EmitForStmt (const ForStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt)
 
void EmitReturnStmt (const ReturnStmt &S)
 
void EmitDeclStmt (const DeclStmt &S)
 
void EmitBreakStmt (const BreakStmt &S)
 
void EmitContinueStmt (const ContinueStmt &S)
 
void EmitSwitchStmt (const SwitchStmt &S)
 
void EmitDefaultStmt (const DefaultStmt &S, ArrayRef< const Attr * > Attrs)
 
void EmitCaseStmt (const CaseStmt &S, ArrayRef< const Attr * > Attrs)
 
void EmitCaseStmtRange (const CaseStmt &S, ArrayRef< const Attr * > Attrs)
 
void EmitAsmStmt (const AsmStmt &S)
 
void EmitObjCForCollectionStmt (const ObjCForCollectionStmt &S)
 
void EmitObjCAtTryStmt (const ObjCAtTryStmt &S)
 
void EmitObjCAtThrowStmt (const ObjCAtThrowStmt &S)
 
void EmitObjCAtSynchronizedStmt (const ObjCAtSynchronizedStmt &S)
 
void EmitObjCAutoreleasePoolStmt (const ObjCAutoreleasePoolStmt &S)
 
void EmitCoroutineBody (const CoroutineBodyStmt &S)
 
void EmitCoreturnStmt (const CoreturnStmt &S)
 
RValue EmitCoawaitExpr (const CoawaitExpr &E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
 
LValue EmitCoawaitLValue (const CoawaitExpr *E)
 
RValue EmitCoyieldExpr (const CoyieldExpr &E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
 
LValue EmitCoyieldLValue (const CoyieldExpr *E)
 
RValue EmitCoroutineIntrinsic (const CallExpr *E, unsigned int IID)
 
void EnterCXXTryStmt (const CXXTryStmt &S, bool IsFnTryBlock=false)
 
void ExitCXXTryStmt (const CXXTryStmt &S, bool IsFnTryBlock=false)
 
void EmitCXXTryStmt (const CXXTryStmt &S)
 
void EmitSEHTryStmt (const SEHTryStmt &S)
 
void EmitSEHLeaveStmt (const SEHLeaveStmt &S)
 
void EnterSEHTryStmt (const SEHTryStmt &S)
 
void ExitSEHTryStmt (const SEHTryStmt &S)
 
void VolatilizeTryBlocks (llvm::BasicBlock *BB, llvm::SmallPtrSet< llvm::BasicBlock *, 10 > &V)
 
void pushSEHCleanup (CleanupKind kind, llvm::Function *FinallyFunc)
 
void startOutlinedSEHHelper (CodeGenFunction &ParentCGF, bool IsFilter, const Stmt *OutlinedStmt)
 
llvm::Function * GenerateSEHFilterFunction (CodeGenFunction &ParentCGF, const SEHExceptStmt &Except)
 
llvm::Function * GenerateSEHFinallyFunction (CodeGenFunction &ParentCGF, const SEHFinallyStmt &Finally)
 
void EmitSEHExceptionCodeSave (CodeGenFunction &ParentCGF, llvm::Value *ParentFP, llvm::Value *EntryEBP)
 
llvm::Value * EmitSEHExceptionCode ()
 
llvm::Value * EmitSEHExceptionInfo ()
 
llvm::Value * EmitSEHAbnormalTermination ()
 
void EmitSimpleOMPExecutableDirective (const OMPExecutableDirective &D)
 Emit simple code for OpenMP directives in Simd-only mode.
 
void EmitCapturedLocals (CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt, bool IsFilter)
 Scan the outlined statement for captures from the parent function.
 
Address recoverAddrOfEscapedLocal (CodeGenFunction &ParentCGF, Address ParentVar, llvm::Value *ParentFP)
 Recovers the address of a local in a parent function.
 
void EmitCXXForRangeStmt (const CXXForRangeStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt)
 
llvm::Value * getTypeSize (QualType Ty)
 Returns calculated size of the specified type.
 
LValue InitCapturedStruct (const CapturedStmt &S)
 
llvm::Function * EmitCapturedStmt (const CapturedStmt &S, CapturedRegionKind K)
 
llvm::Function * GenerateCapturedStmtFunction (const CapturedStmt &S)
 
Address GenerateCapturedStmtArgument (const CapturedStmt &S)
 
llvm::Function * GenerateOpenMPCapturedStmtFunction (const CapturedStmt &S, SourceLocation Loc)
 
void GenerateOpenMPCapturedVars (const CapturedStmt &S, SmallVectorImpl< llvm::Value * > &CapturedVars)
 
void emitOMPSimpleStore (LValue LVal, RValue RVal, QualType RValTy, SourceLocation Loc)
 
void EmitOMPAggregateAssign (Address DestAddr, Address SrcAddr, QualType OriginalType, const llvm::function_ref< void(Address, Address)> CopyGen)
 Perform element by element copying of arrays with type OriginalType from SrcAddr to DestAddr using copying procedure generated by CopyGen.
 
void EmitOMPCopy (QualType OriginalType, Address DestAddr, Address SrcAddr, const VarDecl *DestVD, const VarDecl *SrcVD, const Expr *Copy)
 Emit proper copying of data from one variable to another.
 
std::pair< bool, RValueEmitOMPAtomicSimpleUpdateExpr (LValue X, RValue E, BinaryOperatorKind BO, bool IsXLHSInRHSPart, llvm::AtomicOrdering AO, SourceLocation Loc, const llvm::function_ref< RValue(RValue)> CommonGen)
 Emit atomic update code for constructs: X = X BO E or X = E BO E.
 
bool EmitOMPFirstprivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 
void EmitOMPPrivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 
void EmitOMPUseDevicePtrClause (const OMPUseDevicePtrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap)
 
void EmitOMPUseDeviceAddrClause (const OMPUseDeviceAddrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap)
 
bool EmitOMPCopyinClause (const OMPExecutableDirective &D)
 Emit code for copyin clause in D directive.
 
bool EmitOMPLastprivateClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 Emit initial code for lastprivate variables.
 
void EmitOMPLastprivateClauseFinal (const OMPExecutableDirective &D, bool NoFinals, llvm::Value *IsLastIterCond=nullptr)
 Emit final copying of lastprivate values to original variables at the end of the worksharing or simd directive.
 
void EmitOMPLinearClause (const OMPLoopDirective &D, CodeGenFunction::OMPPrivateScope &PrivateScope)
 Emit initial code for linear clauses.
 
void EmitOMPLinearClauseFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen)
 Emit final code for linear clauses.
 
void EmitOMPReductionClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope, bool ForInscan=false)
 Emit initial code for reduction variables.
 
void EmitOMPReductionClauseFinal (const OMPExecutableDirective &D, const OpenMPDirectiveKind ReductionKind)
 Emit final update of reduction values to original variables at the end of the directive.
 
bool EmitOMPLinearClauseInit (const OMPLoopDirective &D)
 Emit initial code for linear variables.
 
void EmitOMPTaskBasedDirective (const OMPExecutableDirective &S, const OpenMPDirectiveKind CapturedRegion, const RegionCodeGenTy &BodyGen, const TaskGenTy &TaskGen, OMPTaskDataTy &Data)
 
void EmitOMPTargetTaskBasedDirective (const OMPExecutableDirective &S, const RegionCodeGenTy &BodyGen, OMPTargetDataInfo &InputInfo)
 
void processInReduction (const OMPExecutableDirective &S, OMPTaskDataTy &Data, CodeGenFunction &CGF, const CapturedStmt *CS, OMPPrivateScope &Scope)
 
void EmitOMPMetaDirective (const OMPMetaDirective &S)
 
void EmitOMPParallelDirective (const OMPParallelDirective &S)
 
void EmitOMPSimdDirective (const OMPSimdDirective &S)
 
void EmitOMPTileDirective (const OMPTileDirective &S)
 
void EmitOMPUnrollDirective (const OMPUnrollDirective &S)
 
void EmitOMPReverseDirective (const OMPReverseDirective &S)
 
void EmitOMPInterchangeDirective (const OMPInterchangeDirective &S)
 
void EmitOMPForDirective (const OMPForDirective &S)
 
void EmitOMPForSimdDirective (const OMPForSimdDirective &S)
 
void EmitOMPSectionsDirective (const OMPSectionsDirective &S)
 
void EmitOMPSectionDirective (const OMPSectionDirective &S)
 
void EmitOMPSingleDirective (const OMPSingleDirective &S)
 
void EmitOMPMasterDirective (const OMPMasterDirective &S)
 
void EmitOMPMaskedDirective (const OMPMaskedDirective &S)
 
void EmitOMPCriticalDirective (const OMPCriticalDirective &S)
 
void EmitOMPParallelForDirective (const OMPParallelForDirective &S)
 
void EmitOMPParallelForSimdDirective (const OMPParallelForSimdDirective &S)
 
void EmitOMPParallelSectionsDirective (const OMPParallelSectionsDirective &S)
 
void EmitOMPParallelMasterDirective (const OMPParallelMasterDirective &S)
 
void EmitOMPTaskDirective (const OMPTaskDirective &S)
 
void EmitOMPTaskyieldDirective (const OMPTaskyieldDirective &S)
 
void EmitOMPErrorDirective (const OMPErrorDirective &S)
 
void EmitOMPBarrierDirective (const OMPBarrierDirective &S)
 
void EmitOMPTaskwaitDirective (const OMPTaskwaitDirective &S)
 
void EmitOMPTaskgroupDirective (const OMPTaskgroupDirective &S)
 
void EmitOMPFlushDirective (const OMPFlushDirective &S)
 
void EmitOMPDepobjDirective (const OMPDepobjDirective &S)
 
void EmitOMPScanDirective (const OMPScanDirective &S)
 
void EmitOMPOrderedDirective (const OMPOrderedDirective &S)
 
void EmitOMPAtomicDirective (const OMPAtomicDirective &S)
 
void EmitOMPTargetDirective (const OMPTargetDirective &S)
 
void EmitOMPTargetDataDirective (const OMPTargetDataDirective &S)
 
void EmitOMPTargetEnterDataDirective (const OMPTargetEnterDataDirective &S)
 
void EmitOMPTargetExitDataDirective (const OMPTargetExitDataDirective &S)
 
void EmitOMPTargetUpdateDirective (const OMPTargetUpdateDirective &S)
 
void EmitOMPTargetParallelDirective (const OMPTargetParallelDirective &S)
 
void EmitOMPTargetParallelForDirective (const OMPTargetParallelForDirective &S)
 
void EmitOMPTeamsDirective (const OMPTeamsDirective &S)
 
void EmitOMPCancellationPointDirective (const OMPCancellationPointDirective &S)
 
void EmitOMPCancelDirective (const OMPCancelDirective &S)
 
void EmitOMPTaskLoopBasedDirective (const OMPLoopDirective &S)
 
void EmitOMPTaskLoopDirective (const OMPTaskLoopDirective &S)
 
void EmitOMPTaskLoopSimdDirective (const OMPTaskLoopSimdDirective &S)
 
void EmitOMPMasterTaskLoopDirective (const OMPMasterTaskLoopDirective &S)
 
void EmitOMPMasterTaskLoopSimdDirective (const OMPMasterTaskLoopSimdDirective &S)
 
void EmitOMPParallelMasterTaskLoopDirective (const OMPParallelMasterTaskLoopDirective &S)
 
void EmitOMPParallelMasterTaskLoopSimdDirective (const OMPParallelMasterTaskLoopSimdDirective &S)
 
void EmitOMPDistributeDirective (const OMPDistributeDirective &S)
 
void EmitOMPDistributeParallelForDirective (const OMPDistributeParallelForDirective &S)
 
void EmitOMPDistributeParallelForSimdDirective (const OMPDistributeParallelForSimdDirective &S)
 
void EmitOMPDistributeSimdDirective (const OMPDistributeSimdDirective &S)
 
void EmitOMPTargetParallelForSimdDirective (const OMPTargetParallelForSimdDirective &S)
 
void EmitOMPTargetSimdDirective (const OMPTargetSimdDirective &S)
 
void EmitOMPTeamsDistributeDirective (const OMPTeamsDistributeDirective &S)
 
void EmitOMPTeamsDistributeSimdDirective (const OMPTeamsDistributeSimdDirective &S)
 
void EmitOMPTeamsDistributeParallelForSimdDirective (const OMPTeamsDistributeParallelForSimdDirective &S)
 
void EmitOMPTeamsDistributeParallelForDirective (const OMPTeamsDistributeParallelForDirective &S)
 
void EmitOMPTargetTeamsDirective (const OMPTargetTeamsDirective &S)
 
void EmitOMPTargetTeamsDistributeDirective (const OMPTargetTeamsDistributeDirective &S)
 
void EmitOMPTargetTeamsDistributeParallelForDirective (const OMPTargetTeamsDistributeParallelForDirective &S)
 
void EmitOMPTargetTeamsDistributeParallelForSimdDirective (const OMPTargetTeamsDistributeParallelForSimdDirective &S)
 
void EmitOMPTargetTeamsDistributeSimdDirective (const OMPTargetTeamsDistributeSimdDirective &S)
 
void EmitOMPGenericLoopDirective (const OMPGenericLoopDirective &S)
 
void EmitOMPParallelGenericLoopDirective (const OMPLoopDirective &S)
 
void EmitOMPTargetParallelGenericLoopDirective (const OMPTargetParallelGenericLoopDirective &S)
 
void EmitOMPTargetTeamsGenericLoopDirective (const OMPTargetTeamsGenericLoopDirective &S)
 
void EmitOMPTeamsGenericLoopDirective (const OMPTeamsGenericLoopDirective &S)
 
void EmitOMPInteropDirective (const OMPInteropDirective &S)
 
void EmitOMPParallelMaskedDirective (const OMPParallelMaskedDirective &S)
 
void EmitOMPAssumeDirective (const OMPAssumeDirective &S)
 
llvm::CanonicalLoopInfo * EmitOMPCollapsedCanonicalLoopNest (const Stmt *S, int Depth)
 Emit the Stmt S and return its topmost canonical loop, if any.
 
void EmitOMPCanonicalLoop (const OMPCanonicalLoop *S)
 Emit an OMPCanonicalLoop using the OpenMPIRBuilder.
 
void EmitOMPInnerLoop (const OMPExecutableDirective &S, bool RequiresCleanup, const Expr *LoopCond, const Expr *IncExpr, const llvm::function_ref< void(CodeGenFunction &)> BodyGen, const llvm::function_ref< void(CodeGenFunction &)> PostIncGen)
 Emit inner loop of the worksharing/simd construct.
 
JumpDest getOMPCancelDestination (OpenMPDirectiveKind Kind)
 
void EmitOMPPrivateLoopCounters (const OMPLoopDirective &S, OMPPrivateScope &LoopScope)
 Emit initial code for loop counters of loop-based directives.
 
void EmitOMPLoopBody (const OMPLoopDirective &D, JumpDest LoopExit)
 Helper for the OpenMP loop directives.
 
bool EmitOMPWorksharingLoop (const OMPLoopDirective &S, Expr *EUB, const CodeGenLoopBoundsTy &CodeGenLoopBounds, const CodeGenDispatchBoundsTy &CGDispatchBounds)
 Emit code for the worksharing loop-based directive.
 
void EmitOMPDistributeLoop (const OMPLoopDirective &S, const CodeGenLoopTy &CodeGenLoop, Expr *IncExpr)
 Emit code for the distribute loop-based directive.
 
void EmitOMPSimdInit (const OMPLoopDirective &D)
 Helpers for the OpenMP loop directives.
 
void EmitOMPSimdFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen)
 
LValue EmitOMPSharedLValue (const Expr *E)
 Emits the lvalue for the expression with possibly captured variable.
 
void EmitOpenACCComputeConstruct (const OpenACCComputeConstruct &S)
 
void EmitOpenACCLoopConstruct (const OpenACCLoopConstruct &S)
 
llvm::Value * EmitNonNullRValueCheck (RValue RV, QualType T)
 Create a check that a scalar RValue is non-null.
 
RValue GetUndefRValue (QualType Ty)
 GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
 
RValue EmitUnsupportedRValue (const Expr *E, const char *Name)
 EmitUnsupportedRValue - Emit a dummy r-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
 
LValue EmitUnsupportedLValue (const Expr *E, const char *Name)
 EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
 
LValue EmitLValue (const Expr *E, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 EmitLValue - Emit code to compute a designator that specifies the location of the expression.
 
LValue EmitCheckedLValue (const Expr *E, TypeCheckKind TCK)
 Same as EmitLValue but additionally we generate checking code to guard against undefined behavior.
 
RValue convertTempToRValue (Address addr, QualType type, SourceLocation Loc)
 
void EmitAtomicInit (Expr *E, LValue lvalue)
 
bool LValueIsSuitableForInlineAtomic (LValue Src)
 
RValue EmitAtomicLoad (LValue LV, SourceLocation SL, AggValueSlot Slot=AggValueSlot::ignored())
 
RValue EmitAtomicLoad (LValue lvalue, SourceLocation loc, llvm::AtomicOrdering AO, bool IsVolatile=false, AggValueSlot slot=AggValueSlot::ignored())
 
void EmitAtomicStore (RValue rvalue, LValue lvalue, bool isInit)
 
void EmitAtomicStore (RValue rvalue, LValue lvalue, llvm::AtomicOrdering AO, bool IsVolatile, bool isInit)
 
std::pair< RValue, llvm::Value * > EmitAtomicCompareExchange (LValue Obj, RValue Expected, RValue Desired, SourceLocation Loc, llvm::AtomicOrdering Success=llvm::AtomicOrdering::SequentiallyConsistent, llvm::AtomicOrdering Failure=llvm::AtomicOrdering::SequentiallyConsistent, bool IsWeak=false, AggValueSlot Slot=AggValueSlot::ignored())
 
llvm::AtomicRMWInst * emitAtomicRMWInst (llvm::AtomicRMWInst::BinOp Op, Address Addr, llvm::Value *Val, llvm::AtomicOrdering Order=llvm::AtomicOrdering::SequentiallyConsistent, llvm::SyncScope::ID SSID=llvm::SyncScope::System)
 Emit an atomicrmw instruction, and applying relevant metadata when applicable.
 
void EmitAtomicUpdate (LValue LVal, llvm::AtomicOrdering AO, const llvm::function_ref< RValue(RValue)> &UpdateOp, bool IsVolatile)
 
llvm::Value * EmitToMemory (llvm::Value *Value, QualType Ty)
 EmitToMemory - Change a scalar value from its value representation to its in-memory representation.
 
llvm::Value * EmitFromMemory (llvm::Value *Value, QualType Ty)
 EmitFromMemory - Change a scalar value from its memory representation to its value representation.
 
bool EmitScalarRangeCheck (llvm::Value *Value, QualType Ty, SourceLocation Loc)
 Check if the scalar Value is within the valid range for the given type Ty.
 
llvm::Value * EmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, AlignmentSource Source=AlignmentSource::Type, bool isNontemporal=false)
 EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
 
llvm::Value * EmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo, bool isNontemporal=false)
 
llvm::Value * EmitLoadOfScalar (LValue lvalue, SourceLocation Loc)
 EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
 
void EmitStoreOfScalar (llvm::Value *Value, Address Addr, bool Volatile, QualType Ty, AlignmentSource Source=AlignmentSource::Type, bool isInit=false, bool isNontemporal=false)
 EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
 
void EmitStoreOfScalar (llvm::Value *Value, Address Addr, bool Volatile, QualType Ty, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo, bool isInit=false, bool isNontemporal=false)
 
void EmitStoreOfScalar (llvm::Value *value, LValue lvalue, bool isInit=false)
 EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
 
RValue EmitLoadOfLValue (LValue V, SourceLocation Loc)
 EmitLoadOfLValue - Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue.
 
RValue EmitLoadOfExtVectorElementLValue (LValue V)
 
RValue EmitLoadOfBitfieldLValue (LValue LV, SourceLocation Loc)
 
RValue EmitLoadOfGlobalRegLValue (LValue LV)
 
RValue EmitLoadOfAnyValue (LValue V, AggValueSlot Slot=AggValueSlot::ignored(), SourceLocation Loc={})
 Like EmitLoadOfLValue but also handles complex and aggregate types.
 
void EmitStoreThroughLValue (RValue Src, LValue Dst, bool isInit=false)
 EmitStoreThroughLValue - Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same type, and that type is 'Ty'.
 
void EmitStoreThroughExtVectorComponentLValue (RValue Src, LValue Dst)
 
void EmitStoreThroughGlobalRegLValue (RValue Src, LValue Dst)
 
void EmitStoreThroughBitfieldLValue (RValue Src, LValue Dst, llvm::Value **Result=nullptr)
 EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue.
 
LValue EmitComplexAssignmentLValue (const BinaryOperator *E)
 Emit an l-value for an assignment (simple or compound) of complex type.
 
LValue EmitComplexCompoundAssignmentLValue (const CompoundAssignOperator *E)
 
LValue EmitScalarCompoundAssignWithComplex (const CompoundAssignOperator *E, llvm::Value *&Result)
 
LValue EmitBinaryOperatorLValue (const BinaryOperator *E)
 
LValue EmitCompoundAssignmentLValue (const CompoundAssignOperator *E)
 
LValue EmitCallExprLValue (const CallExpr *E)
 
LValue EmitVAArgExprLValue (const VAArgExpr *E)
 
LValue EmitDeclRefLValue (const DeclRefExpr *E)
 
LValue EmitStringLiteralLValue (const StringLiteral *E)
 
LValue EmitObjCEncodeExprLValue (const ObjCEncodeExpr *E)
 
LValue EmitPredefinedLValue (const PredefinedExpr *E)
 
LValue EmitUnaryOpLValue (const UnaryOperator *E)
 
LValue EmitArraySubscriptExpr (const ArraySubscriptExpr *E, bool Accessed=false)
 
LValue EmitMatrixSubscriptExpr (const MatrixSubscriptExpr *E)
 
LValue EmitArraySectionExpr (const ArraySectionExpr *E, bool IsLowerBound=true)
 
LValue EmitExtVectorElementExpr (const ExtVectorElementExpr *E)
 
LValue EmitMemberExpr (const MemberExpr *E)
 
LValue EmitObjCIsaExpr (const ObjCIsaExpr *E)
 
LValue EmitCompoundLiteralLValue (const CompoundLiteralExpr *E)
 
LValue EmitInitListLValue (const InitListExpr *E)
 
void EmitIgnoredConditionalOperator (const AbstractConditionalOperator *E)
 
LValue EmitConditionalOperatorLValue (const AbstractConditionalOperator *E)
 
LValue EmitCastLValue (const CastExpr *E)
 
LValue EmitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *E)
 
LValue EmitOpaqueValueLValue (const OpaqueValueExpr *e)
 
Address EmitExtVectorElementLValue (LValue V)
 
RValue EmitRValueForField (LValue LV, const FieldDecl *FD, SourceLocation Loc)
 
Address EmitArrayToPointerDecay (const Expr *Array, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 
ConstantEmission tryEmitAsConstant (DeclRefExpr *refExpr)
 
ConstantEmission tryEmitAsConstant (const MemberExpr *ME)
 
llvm::Value * emitScalarConstant (const ConstantEmission &Constant, Expr *E)
 
RValue EmitPseudoObjectRValue (const PseudoObjectExpr *e, AggValueSlot slot=AggValueSlot::ignored())
 
LValue EmitPseudoObjectLValue (const PseudoObjectExpr *e)
 
llvm::Value * EmitIvarOffset (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar)
 
llvm::Value * EmitIvarOffsetAsPointerDiff (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar)
 
LValue EmitLValueForField (LValue Base, const FieldDecl *Field)
 
LValue EmitLValueForLambdaField (const FieldDecl *Field)
 
LValue EmitLValueForLambdaField (const FieldDecl *Field, llvm::Value *ThisValue)
 
LValue EmitLValueForFieldInitialization (LValue Base, const FieldDecl *Field)
 EmitLValueForFieldInitialization - Like EmitLValueForField, except that if the Field is a reference, this will return the address of the reference and not the address of the value stored in the reference.
 
LValue EmitLValueForIvar (QualType ObjectTy, llvm::Value *Base, const ObjCIvarDecl *Ivar, unsigned CVRQualifiers)
 
LValue EmitCXXConstructLValue (const CXXConstructExpr *E)
 
LValue EmitCXXBindTemporaryLValue (const CXXBindTemporaryExpr *E)
 
LValue EmitCXXTypeidLValue (const CXXTypeidExpr *E)
 
LValue EmitCXXUuidofLValue (const CXXUuidofExpr *E)
 
LValue EmitObjCMessageExprLValue (const ObjCMessageExpr *E)
 
LValue EmitObjCIvarRefLValue (const ObjCIvarRefExpr *E)
 
LValue EmitStmtExprLValue (const StmtExpr *E)
 
LValue EmitPointerToDataMemberBinaryExpr (const BinaryOperator *E)
 
LValue EmitObjCSelectorLValue (const ObjCSelectorExpr *E)
 
void EmitDeclRefExprDbgValue (const DeclRefExpr *E, const APValue &Init)
 
RValue EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::CallBase **callOrInvoke, bool IsMustTail, SourceLocation Loc, bool IsVirtualFunctionPointerThunk=false)
 EmitCall - Generate a call of the given function, expecting the given result type, and using the given argument list which specifies both the LLVM arguments and the types they were derived from.
 
RValue EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::CallBase **callOrInvoke=nullptr, bool IsMustTail=false)
 
RValue EmitCall (QualType FnType, const CGCallee &Callee, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Value *Chain=nullptr)
 
RValue EmitCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue=ReturnValueSlot())
 
RValue EmitSimpleCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue)
 
CGCallee EmitCallee (const Expr *E)
 
void checkTargetFeatures (const CallExpr *E, const FunctionDecl *TargetDecl)
 
void checkTargetFeatures (SourceLocation Loc, const FunctionDecl *TargetDecl)
 
llvm::CallInst * EmitRuntimeCall (llvm::FunctionCallee callee, const Twine &name="")
 
llvm::CallInst * EmitRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
 
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, const Twine &name="")
 
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< Address > args, const Twine &name="")
 
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
 
SmallVector< llvm::OperandBundleDef, 1 > getBundlesForFunclet (llvm::Value *Callee)
 
llvm::CallBase * EmitCallOrInvoke (llvm::FunctionCallee Callee, ArrayRef< llvm::Value * > Args, const Twine &Name="")
 
llvm::CallBase * EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
 
llvm::CallBase * EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, const Twine &name="")
 
void EmitNoreturnRuntimeCallOrInvoke (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args)
 
CGCallee BuildAppleKextVirtualCall (const CXXMethodDecl *MD, NestedNameSpecifier *Qual, llvm::Type *Ty)
 
CGCallee BuildAppleKextVirtualDestructorCall (const CXXDestructorDecl *DD, CXXDtorType Type, const CXXRecordDecl *RD)
 
bool isPointerKnownNonNull (const Expr *E)
 
llvm::Value * EmitPointerAuthBlendDiscriminator (llvm::Value *StorageAddress, llvm::Value *Discriminator)
 Create the discriminator from the storage address and the entity hash.
 
CGPointerAuthInfo EmitPointerAuthInfo (const PointerAuthSchema &Schema, llvm::Value *StorageAddress, GlobalDecl SchemaDecl, QualType SchemaType)
 
llvm::Value * EmitPointerAuthSign (const CGPointerAuthInfo &Info, llvm::Value *Pointer)
 
llvm::Value * EmitPointerAuthAuth (const CGPointerAuthInfo &Info, llvm::Value *Pointer)
 
llvm::Value * emitPointerAuthResign (llvm::Value *Pointer, QualType PointerType, const CGPointerAuthInfo &CurAuthInfo, const CGPointerAuthInfo &NewAuthInfo, bool IsKnownNonNull)
 
llvm::Value * emitPointerAuthResignCall (llvm::Value *Pointer, const CGPointerAuthInfo &CurInfo, const CGPointerAuthInfo &NewInfo)
 
void EmitPointerAuthOperandBundle (const CGPointerAuthInfo &Info, SmallVectorImpl< llvm::OperandBundleDef > &Bundles)
 
llvm::Value * authPointerToPointerCast (llvm::Value *ResultPtr, QualType SourceType, QualType DestType)
 
Address authPointerToPointerCast (Address Ptr, QualType SourceType, QualType DestType)
 
Address getAsNaturalAddressOf (Address Addr, QualType PointeeTy)
 
llvm::Value * getAsNaturalPointerTo (Address Addr, QualType PointeeType)
 
void defaultInitNonTrivialCStructVar (LValue Dst)
 
void callCStructDefaultConstructor (LValue Dst)
 
void callCStructDestructor (LValue Dst)
 
void callCStructCopyConstructor (LValue Dst, LValue Src)
 
void callCStructMoveConstructor (LValue Dst, LValue Src)
 
void callCStructCopyAssignmentOperator (LValue Dst, LValue Src)
 
void callCStructMoveAssignmentOperator (LValue Dst, LValue Src)
 
RValue EmitCXXMemberOrOperatorCall (const CXXMethodDecl *Method, const CGCallee &Callee, ReturnValueSlot ReturnValue, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E, CallArgList *RtlArgs)
 
RValue EmitCXXDestructorCall (GlobalDecl Dtor, const CGCallee &Callee, llvm::Value *This, QualType ThisTy, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E)
 
RValue EmitCXXMemberCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue)
 
RValue EmitCXXMemberOrOperatorMemberCallExpr (const CallExpr *CE, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue, bool HasQualifier, NestedNameSpecifier *Qualifier, bool IsArrow, const Expr *Base)
 
Address EmitCXXMemberDataPointerAddress (const Expr *E, Address base, llvm::Value *memberPtr, const MemberPointerType *memberPtrType, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 
RValue EmitCXXMemberPointerCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue)
 
RValue EmitCXXOperatorMemberCallExpr (const CXXOperatorCallExpr *E, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue)
 
RValue EmitCXXPseudoDestructorExpr (const CXXPseudoDestructorExpr *E)
 
RValue EmitCUDAKernelCallExpr (const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue)
 
RValue EmitNVPTXDevicePrintfCallExpr (const CallExpr *E)
 
RValue EmitAMDGPUDevicePrintfCallExpr (const CallExpr *E)
 
RValue EmitBuiltinExpr (const GlobalDecl GD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 
RValue emitRotate (const CallExpr *E, bool IsRotateRight)
 
RValue emitBuiltinOSLogFormat (const CallExpr &E)
 Emit IR for __builtin_os_log_format.
 
RValue EmitBuiltinIsAligned (const CallExpr *E)
 Emit IR for __builtin_is_aligned.
 
RValue EmitBuiltinAlignTo (const CallExpr *E, bool AlignUp)
 Emit IR for __builtin_align_up/__builtin_align_down.
 
llvm::Function * generateBuiltinOSLogHelperFunction (const analyze_os_log::OSLogBufferLayout &Layout, CharUnits BufferAlignment)
 
RValue EmitBlockCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue)
 
llvm::Value * EmitTargetBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 EmitTargetBuiltinExpr - Emit the given builtin call.
 
llvm::Value * EmitAArch64CompareBuiltinExpr (llvm::Value *Op, llvm::Type *Ty, const llvm::CmpInst::Predicate Fp, const llvm::CmpInst::Predicate Ip, const llvm::Twine &Name="")
 
llvm::Value * EmitARMBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
 
llvm::Value * EmitARMMVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
 
llvm::Value * EmitARMCDEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
 
llvm::Value * EmitCMSEClearRecord (llvm::Value *V, llvm::IntegerType *ITy, QualType RTy)
 
llvm::Value * EmitCMSEClearRecord (llvm::Value *V, llvm::ArrayType *ATy, QualType RTy)
 
llvm::Value * EmitCommonNeonBuiltinExpr (unsigned BuiltinID, unsigned LLVMIntrinsic, unsigned AltLLVMIntrinsic, const char *NameHint, unsigned Modifier, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, Address PtrOp0, Address PtrOp1, llvm::Triple::ArchType Arch)
 
llvm::Function * LookupNeonLLVMIntrinsic (unsigned IntrinsicID, unsigned Modifier, llvm::Type *ArgTy, const CallExpr *E)
 
llvm::Value * EmitNeonCall (llvm::Function *F, SmallVectorImpl< llvm::Value * > &O, const char *name, unsigned shift=0, bool rightshift=false)
 
llvm::Value * EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx, const llvm::ElementCount &Count)
 
llvm::Value * EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx)
 
llvm::Value * EmitNeonShiftVector (llvm::Value *V, llvm::Type *Ty, bool negateForRightShift)
 
llvm::Value * EmitNeonRShiftImm (llvm::Value *Vec, llvm::Value *Amt, llvm::Type *Ty, bool usgn, const char *name)
 
llvm::Value * vectorWrapScalar16 (llvm::Value *Op)
 
llvm::Type * SVEBuiltinMemEltTy (const SVETypeFlags &TypeFlags)
 SVEBuiltinMemEltTy - Returns the memory element type for this memory access builtin.
 
SmallVector< llvm::Type *, 2 > getSVEOverloadTypes (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops)
 
llvm::Type * getEltType (const SVETypeFlags &TypeFlags)
 
llvm::ScalableVectorType * getSVEType (const SVETypeFlags &TypeFlags)
 
llvm::ScalableVectorType * getSVEPredType (const SVETypeFlags &TypeFlags)
 
llvm::Value * EmitSVETupleSetOrGet (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops)
 
llvm::Value * EmitSVETupleCreate (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops)
 
llvm::Value * EmitSVEAllTruePred (const SVETypeFlags &TypeFlags)
 
llvm::Value * EmitSVEDupX (llvm::Value *Scalar)
 
llvm::Value * EmitSVEDupX (llvm::Value *Scalar, llvm::Type *Ty)
 
llvm::Value * EmitSVEReinterpret (llvm::Value *Val, llvm::Type *Ty)
 
llvm::Value * EmitSVEPMull (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
 
llvm::Value * EmitSVEMovl (const SVETypeFlags &TypeFlags, llvm::ArrayRef< llvm::Value * > Ops, unsigned BuiltinID)
 
llvm::Value * EmitSVEPredicateCast (llvm::Value *Pred, llvm::ScalableVectorType *VTy)
 
llvm::Value * EmitSVEGatherLoad (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSVEScatterStore (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSVEMaskedLoad (const CallExpr *, llvm::Type *ReturnTy, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID, bool IsZExtReturn)
 
llvm::Value * EmitSVEMaskedStore (const CallExpr *, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
 
llvm::Value * EmitSVEPrefetchLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
 
llvm::Value * EmitSVEGatherPrefetch (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSVEStructLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSVEStructStore (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * FormSVEBuiltinResult (llvm::Value *Call)
 FormSVEBuiltinResult - Returns the struct of scalable vectors as a wider vector.
 
llvm::Value * EmitAArch64SVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitSMELd1St1 (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSMEReadWrite (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSMEZero (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
llvm::Value * EmitSMELdrStr (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
 
void GetAArch64SVEProcessedOperands (unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, SVETypeFlags TypeFlags)
 
llvm::Value * EmitAArch64SMEBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitAArch64BuiltinExpr (unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch)
 
llvm::Value * EmitBPFBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * BuildVector (ArrayRef< llvm::Value * > Ops)
 
llvm::Value * EmitX86BuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitPPCBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitAMDGPUBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitHLSLBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitScalarOrConstFoldImmArg (unsigned ICEArguments, unsigned Idx, const CallExpr *E)
 
llvm::Value * EmitSystemZBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitNVPTXBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitWebAssemblyBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitHexagonBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::Value * EmitRISCVBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 
llvm::Value * EmitRISCVCpuSupports (const CallExpr *E)
 
llvm::Value * EmitRISCVCpuSupports (ArrayRef< StringRef > FeaturesStrs)
 
llvm::Value * EmitRISCVCpuInit ()
 
void AddAMDGPUFenceAddressSpaceMMRA (llvm::Instruction *Inst, const CallExpr *E)
 
void ProcessOrderScopeAMDGCN (llvm::Value *Order, llvm::Value *Scope, llvm::AtomicOrdering &AO, llvm::SyncScope::ID &SSID)
 
llvm::Value * EmitMSVCBuiltinExpr (MSVCIntrin BuiltinID, const CallExpr *E)
 
llvm::Value * EmitBuiltinAvailable (const VersionTuple &Version)
 
llvm::Value * EmitObjCProtocolExpr (const ObjCProtocolExpr *E)
 
llvm::Value * EmitObjCStringLiteral (const ObjCStringLiteral *E)
 
llvm::Value * EmitObjCBoxedExpr (const ObjCBoxedExpr *E)
 
llvm::Value * EmitObjCArrayLiteral (const ObjCArrayLiteral *E)
 
llvm::Value * EmitObjCDictionaryLiteral (const ObjCDictionaryLiteral *E)
 
llvm::Value * EmitObjCCollectionLiteral (const Expr *E, const ObjCMethodDecl *MethodWithObjects)
 
llvm::Value * EmitObjCSelectorExpr (const ObjCSelectorExpr *E)
 
RValue EmitObjCMessageExpr (const ObjCMessageExpr *E, ReturnValueSlot Return=ReturnValueSlot())
 
CleanupKind getARCCleanupKind ()
 Retrieves the default cleanup kind for an ARC cleanup.
 
void EmitARCInitWeak (Address addr, llvm::Value *value)
 
void EmitARCDestroyWeak (Address addr)
 
llvm::Value * EmitARCLoadWeak (Address addr)
 
llvm::Value * EmitARCLoadWeakRetained (Address addr)
 
llvm::Value * EmitARCStoreWeak (Address addr, llvm::Value *value, bool ignored)
 
void emitARCCopyAssignWeak (QualType Ty, Address DstAddr, Address SrcAddr)
 
void emitARCMoveAssignWeak (QualType Ty, Address DstAddr, Address SrcAddr)
 
void EmitARCCopyWeak (Address dst, Address src)
 
void EmitARCMoveWeak (Address dst, Address src)
 
llvm::Value * EmitARCRetainAutorelease (QualType type, llvm::Value *value)
 
llvm::Value * EmitARCRetainAutoreleaseNonBlock (llvm::Value *value)
 
llvm::Value * EmitARCStoreStrong (LValue lvalue, llvm::Value *value, bool resultIgnored)
 
llvm::Value * EmitARCStoreStrongCall (Address addr, llvm::Value *value, bool resultIgnored)
 
llvm::Value * EmitARCRetain (QualType type, llvm::Value *value)
 
llvm::Value * EmitARCRetainNonBlock (llvm::Value *value)
 
llvm::Value * EmitARCRetainBlock (llvm::Value *value, bool mandatory)
 
void EmitARCDestroyStrong (Address addr, ARCPreciseLifetime_t precise)
 
void EmitARCRelease (llvm::Value *value, ARCPreciseLifetime_t precise)
 
llvm::Value * EmitARCAutorelease (llvm::Value *value)
 
llvm::Value * EmitARCAutoreleaseReturnValue (llvm::Value *value)
 
llvm::Value * EmitARCRetainAutoreleaseReturnValue (llvm::Value *value)
 
llvm::Value * EmitARCRetainAutoreleasedReturnValue (llvm::Value *value)
 
llvm::Value * EmitARCUnsafeClaimAutoreleasedReturnValue (llvm::Value *value)
 
llvm::Value * EmitObjCAutorelease (llvm::Value *value, llvm::Type *returnType)
 
llvm::Value * EmitObjCRetainNonBlock (llvm::Value *value, llvm::Type *returnType)
 
void EmitObjCRelease (llvm::Value *value, ARCPreciseLifetime_t precise)
 
std::pair< LValue, llvm::Value * > EmitARCStoreAutoreleasing (const BinaryOperator *e)
 
std::pair< LValue, llvm::Value * > EmitARCStoreStrong (const BinaryOperator *e, bool ignored)
 
std::pair< LValue, llvm::Value * > EmitARCStoreUnsafeUnretained (const BinaryOperator *e, bool ignored)
 
llvm::Value * EmitObjCAlloc (llvm::Value *value, llvm::Type *returnType)
 
llvm::Value * EmitObjCAllocWithZone (llvm::Value *value, llvm::Type *returnType)
 
llvm::Value * EmitObjCAllocInit (llvm::Value *value, llvm::Type *resultType)
 
llvm::Value * EmitObjCThrowOperand (const Expr *expr)
 
llvm::Value * EmitObjCConsumeObject (QualType T, llvm::Value *Ptr)
 
llvm::Value * EmitObjCExtendObjectLifetime (QualType T, llvm::Value *Ptr)
 
llvm::Value * EmitARCExtendBlockObject (const Expr *expr)
 
llvm::Value * EmitARCReclaimReturnedObject (const Expr *e, bool allowUnsafeClaim)
 
llvm::Value * EmitARCRetainScalarExpr (const Expr *expr)
 
llvm::Value * EmitARCRetainAutoreleaseScalarExpr (const Expr *expr)
 
llvm::Value * EmitARCUnsafeUnretainedScalarExpr (const Expr *expr)
 
void EmitARCIntrinsicUse (ArrayRef< llvm::Value * > values)
 
void EmitARCNoopIntrinsicUse (ArrayRef< llvm::Value * > values)
 
void EmitObjCAutoreleasePoolPop (llvm::Value *Ptr)
 
llvm::Value * EmitObjCAutoreleasePoolPush ()
 
llvm::Value * EmitObjCMRRAutoreleasePoolPush ()
 
void EmitObjCAutoreleasePoolCleanup (llvm::Value *Ptr)
 
void EmitObjCMRRAutoreleasePoolPop (llvm::Value *Ptr)
 
RValue EmitReferenceBindingToExpr (const Expr *E)
 Emits a reference binding to the passed in expression.
 
llvm::Value * EmitScalarExpr (const Expr *E, bool IgnoreResultAssign=false)
 EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result.
 
llvm::Value * EmitScalarConversion (llvm::Value *Src, QualType SrcTy, QualType DstTy, SourceLocation Loc)
 Emit a conversion from the specified type to the specified destination type, both of which are LLVM scalar types.
 
llvm::Value * EmitComplexToScalarConversion (ComplexPairTy Src, QualType SrcTy, QualType DstTy, SourceLocation Loc)
 Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type.
 
void EmitAggExpr (const Expr *E, AggValueSlot AS)
 EmitAggExpr - Emit the computation of the specified expression of aggregate type.
 
LValue EmitAggExprToLValue (const Expr *E)
 EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
 
void EmitAggFinalDestCopy (QualType Type, AggValueSlot Dest, const LValue &Src, ExprValueKind SrcKind)
 EmitAggFinalDestCopy - Emit copy of the specified aggregate into destination address.
 
void CreateCoercedStore (llvm::Value *Src, Address Dst, llvm::TypeSize DstSize, bool DstIsVolatile)
 Create a store to.
 
void EmitExtendGCLifetime (llvm::Value *object)
 EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point.
 
ComplexPairTy EmitComplexExpr (const Expr *E, bool IgnoreReal=false, bool IgnoreImag=false)
 EmitComplexExpr - Emit the computation of the specified expression of complex type, returning the result.
 
void EmitComplexExprIntoLValue (const Expr *E, LValue dest, bool isInit)
 EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.
 
void EmitStoreOfComplex (ComplexPairTy V, LValue dest, bool isInit)
 EmitStoreOfComplex - Store a complex number into the specified l-value.
 
ComplexPairTy EmitLoadOfComplex (LValue src, SourceLocation loc)
 EmitLoadOfComplex - Load a complex number from the specified l-value.
 
ComplexPairTy EmitPromotedComplexExpr (const Expr *E, QualType PromotionType)
 
llvm::Value * EmitPromotedScalarExpr (const Expr *E, QualType PromotionType)
 
ComplexPairTy EmitPromotedValue (ComplexPairTy result, QualType PromotionType)
 
ComplexPairTy EmitUnPromotedValue (ComplexPairTy result, QualType PromotionType)
 
Address emitAddrOfRealComponent (Address complex, QualType complexType)
 
Address emitAddrOfImagComponent (Address complex, QualType complexType)
 
llvm::GlobalVariable * AddInitializerToStaticVarDecl (const VarDecl &D, llvm::GlobalVariable *GV)
 AddInitializerToStaticVarDecl - Add the initializer for 'D' to the global variable that has already been created for it.
 
void EmitInvariantStart (llvm::Constant *Addr, CharUnits Size)
 
void EmitCXXGlobalVarDeclInit (const VarDecl &D, llvm::GlobalVariable *GV, bool PerformInit)
 EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage.
 
llvm::Constant * createAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr)
 
llvm::Function * createTLSAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr, llvm::FunctionCallee &AtExit)
 
void registerGlobalDtorWithAtExit (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr)
 Call atexit() with a function that passes the given argument to the given function.
 
void registerGlobalDtorWithLLVM (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr)
 Registers the dtor using 'llvm.global_dtors' for platforms that do not support an 'atexit()' function.
 
void registerGlobalDtorWithAtExit (llvm::Constant *dtorStub)
 Call atexit() with function dtorStub.
 
llvm::Value * unregisterGlobalDtorWithUnAtExit (llvm::Constant *dtorStub)
 Call unatexit() with function dtorStub.
 
void EmitCXXGuardedInit (const VarDecl &D, llvm::GlobalVariable *DeclPtr, bool PerformInit)
 Emit code in this function to perform a guarded variable initialization.
 
void EmitCXXGuardedInitBranch (llvm::Value *NeedsInit, llvm::BasicBlock *InitBlock, llvm::BasicBlock *NoInitBlock, GuardKind Kind, const VarDecl *D)
 Emit a branch to select whether or not to perform guarded initialization.
 
void GenerateCXXGlobalInitFunc (llvm::Function *Fn, ArrayRef< llvm::Function * > CXXThreadLocals, ConstantAddress Guard=ConstantAddress::invalid())
 GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
 
void GenerateCXXGlobalCleanUpFunc (llvm::Function *Fn, ArrayRef< std::tuple< llvm::FunctionType *, llvm::WeakTrackingVH, llvm::Constant * > > DtorsOrStermFinalizers)
 GenerateCXXGlobalCleanUpFunc - Generates code for cleaning up global variables.
 
void GenerateCXXGlobalVarDeclInitFunc (llvm::Function *Fn, const VarDecl *D, llvm::GlobalVariable *Addr, bool PerformInit)
 
void EmitCXXConstructExpr (const CXXConstructExpr *E, AggValueSlot Dest)
 
void EmitSynthesizedCXXCopyCtor (Address Dest, Address Src, const Expr *Exp)
 
void EmitCXXThrowExpr (const CXXThrowExpr *E, bool KeepInsertionPoint=true)
 
RValue EmitAtomicExpr (AtomicExpr *E)
 
llvm::Value * EmitAnnotationCall (llvm::Function *AnnotationFn, llvm::Value *AnnotatedVal, StringRef AnnotationStr, SourceLocation Location, const AnnotateAttr *Attr)
 Emit an annotation call (intrinsic).
 
void EmitVarAnnotations (const VarDecl *D, llvm::Value *V)
 Emit local annotations for the local variable V, declared by D.
 
Address EmitFieldAnnotations (const FieldDecl *D, Address V)
 Emit field annotations for the given field & value.
 
bool ConstantFoldsToSimpleInteger (const Expr *Cond, bool &Result, bool AllowLabels=false)
 ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.
 
bool ConstantFoldsToSimpleInteger (const Expr *Cond, llvm::APSInt &Result, bool AllowLabels=false)
 ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.
 
void EmitBranchToCounterBlock (const Expr *Cond, BinaryOperator::Opcode LOp, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount=0, Stmt::Likelihood LH=Stmt::LH_None, const Expr *CntrIdx=nullptr)
 EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode.
 
void EmitBranchOnBoolExpr (const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount, Stmt::Likelihood LH=Stmt::LH_None, const Expr *ConditionalOp=nullptr)
 EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g.
 
void EmitNullabilityCheck (LValue LHS, llvm::Value *RHS, SourceLocation Loc)
 Given an assignment *LHS = RHS, emit a test that checks if RHS is nonnull, if LHS is marked _Nonnull.
 
llvm::Value * EmitCheckedInBoundsGEP (llvm::Type *ElemTy, llvm::Value *Ptr, ArrayRef< llvm::Value * > IdxList, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, const Twine &Name="")
 Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled.
 
Address EmitCheckedInBoundsGEP (Address Addr, ArrayRef< llvm::Value * > IdxList, llvm::Type *elementType, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, CharUnits Align, const Twine &Name="")
 
llvm::Value * EmitCheckedArgForBuiltin (const Expr *E, BuiltinCheckKind Kind)
 Emits an argument for a call to a builtin.
 
llvm::Constant * EmitCheckTypeDescriptor (QualType T)
 Emit a description of a type in a format suitable for passing to a runtime sanitizer handler.
 
llvm::Value * EmitCheckValue (llvm::Value *V)
 Convert a value into a format suitable for passing to a runtime sanitizer handler.
 
llvm::Constant * EmitCheckSourceLocation (SourceLocation Loc)
 Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler.
 
void EmitKCFIOperandBundle (const CGCallee &Callee, SmallVectorImpl< llvm::OperandBundleDef > &Bundles)
 
void EmitCheck (ArrayRef< std::pair< llvm::Value *, SanitizerMask > > Checked, SanitizerHandler Check, ArrayRef< llvm::Constant * > StaticArgs, ArrayRef< llvm::Value * > DynamicArgs)
 Create a basic block that will either trap or call a handler function in the UBSan runtime with the provided arguments, and create a conditional branch to it.
 
void EmitCfiSlowPathCheck (SanitizerMask Kind, llvm::Value *Cond, llvm::ConstantInt *TypeId, llvm::Value *Ptr, ArrayRef< llvm::Constant * > StaticArgs)
 Emit a slow path cross-DSO CFI check which calls __cfi_slowpath if Cond if false.
 
void EmitUnreachable (SourceLocation Loc)
 Emit a reached-unreachable diagnostic if Loc is valid and runtime checking is enabled.
 
void EmitTrapCheck (llvm::Value *Checked, SanitizerHandler CheckHandlerID)
 Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks.
 
llvm::CallInst * EmitTrapCall (llvm::Intrinsic::ID IntrID)
 Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified.
 
void EmitCfiCheckStub ()
 Emit a stub for the cross-DSO CFI check function.
 
void EmitCfiCheckFail ()
 Emit a cross-DSO CFI failure handling function.
 
void EmitNonNullArgCheck (RValue RV, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum)
 Create a check for a function parameter that may potentially be declared as non-null.
 
void EmitNonNullArgCheck (Address Addr, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum)
 
void EmitCallArg (CallArgList &args, const Expr *E, QualType ArgType)
 EmitCallArg - Emit a single call argument.
 
void EmitDelegateCallArg (CallArgList &args, const VarDecl *param, SourceLocation loc)
 EmitDelegateCallArg - We are performing a delegate call; that is, the current function is delegating to another one.
 
void SetFPAccuracy (llvm::Value *Val, float Accuracy)
 SetFPAccuracy - Set the minimum required accuracy of the given floating point operation, expressed as the maximum relative error in ulp.
 
void SetSqrtFPAccuracy (llvm::Value *Val)
 Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
 
void SetDivFPAccuracy (llvm::Value *Val)
 Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
 
void SetFastMathFlags (FPOptions FPFeatures)
 Set the codegen fast-math flags.
 
llvm::Value * emitBoolVecConversion (llvm::Value *SrcVec, unsigned NumElementsDst, const llvm::Twine &Name="")
 
template<typename CallType >
CallType * addControlledConvergenceToken (CallType *Input)
 
void EmitCallArgs (CallArgList &Args, PrototypeWrapper Prototype, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, AbstractCallee AC=AbstractCallee(), unsigned ParamsToSkip=0, EvaluationOrder Order=EvaluationOrder::Default)
 
Address EmitPointerWithAlignment (const Expr *Addr, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.
 
llvm::Value * LoadPassedObjectSize (const Expr *E, QualType EltTy)
 If E references a parameter with pass_object_size info or a constant array size modifier, emit the object size divided by the size of EltTy.
 
void EmitSanitizerStatReport (llvm::SanitizerStatKind SSK)
 
void EmitMultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options)
 
void EmitX86MultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options)
 
void EmitAArch64MultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options)
 
- Public Member Functions inherited from clang::CodeGen::CodeGenTypeCache
CharUnits getIntSize () const
 
CharUnits getIntAlign () const
 
CharUnits getSizeSize () const
 
CharUnits getSizeAlign () const
 
CharUnits getPointerSize () const
 
CharUnits getPointerAlign () const
 
llvm::CallingConv::ID getRuntimeCC () const
 
LangAS getASTAllocaAddressSpace () const
 

Static Public Member Functions

static bool cxxDestructorCanThrow (QualType T)
 Check if T is a C++ class that has a destructor that can throw.
 
static bool IsConstructorDelegationValid (const CXXConstructorDecl *Ctor)
 
static TypeEvaluationKind getEvaluationKind (QualType T)
 getEvaluationKind - Return the TypeEvaluationKind of QualType T.
 
static bool hasScalarEvaluationKind (QualType T)
 
static bool hasAggregateEvaluationKind (QualType T)
 
static unsigned getAccessedFieldNo (unsigned Idx, const llvm::Constant *Elts)
 getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.
 
static bool IsWrappedCXXThis (const Expr *E)
 Check if E is a C++ "this" pointer wrapped in value-preserving casts.
 
static bool ShouldNullCheckClassCastValue (const CastExpr *Cast)
 
static bool isNullPointerAllowed (TypeCheckKind TCK)
 Determine whether the pointer type check TCK permits null pointers.
 
static bool isVptrCheckRequired (TypeCheckKind TCK, QualType Ty)
 Determine whether the pointer type check TCK requires a vptr check.
 
static void EmitOMPTargetDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetDirective &S)
 Emit device code for the target directive.
 
static void EmitOMPTargetParallelDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelDirective &S)
 
static void EmitOMPTargetParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForDirective &S)
 Emit device code for the target parallel for directive.
 
static void EmitOMPTargetParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForSimdDirective &S)
 Emit device code for the target parallel for simd directive.
 
static void EmitOMPTargetTeamsDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDirective &S)
 Emit device code for the target teams directive.
 
static void EmitOMPTargetTeamsDistributeDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeDirective &S)
 Emit device code for the target teams distribute directive.
 
static void EmitOMPTargetTeamsDistributeSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeSimdDirective &S)
 Emit device code for the target teams distribute simd directive.
 
static void EmitOMPTargetSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetSimdDirective &S)
 Emit device code for the target simd directive.
 
static void EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForSimdDirective &S)
 Emit device code for the target teams distribute parallel for simd directive.
 
static void EmitOMPTargetTeamsGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsGenericLoopDirective &S)
 Emit device code for the target teams loop directive.
 
static void EmitOMPTargetParallelGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelGenericLoopDirective &S)
 Emit device code for the target parallel loop directive.
 
static void EmitOMPTargetTeamsDistributeParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForDirective &S)
 
static std::string getNonTrivialCopyConstructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx)
 
static std::string getNonTrivialDestructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx)
 
static bool ContainsLabel (const Stmt *S, bool IgnoreCaseStmts=false)
 ContainsLabel - Return true if the statement contains a label in it.
 
static bool containsBreak (const Stmt *S)
 containsBreak - Return true if the statement contains a break out of it.
 
static bool mightAddDeclToScope (const Stmt *S)
 Determine if the given statement might introduce a declaration into the current scope, by being a (possibly-labelled) DeclStmt.
 
static const ExprstripCond (const Expr *C)
 Ignore parentheses and logical-NOT to track conditions consistently.
 
static bool isInstrumentedCondition (const Expr *C)
 isInstrumentedCondition - Determine whether the given condition is an instrumentable condition (i.e.
 

Public Attributes

CodeGenModuleCGM
 
const TargetInfoTarget
 
CodeGenFunctionParentCGF = nullptr
 
LoopInfoStack LoopStack
 
CGBuilderTy Builder
 
VarBypassDetector Bypasses
 
SmallVector< llvm::CanonicalLoopInfo *, 4 > OMPLoopNestStack
 List of recently emitted OMPCanonicalLoops.
 
SmallVector< const BinaryOperator *, 16 > MCDCLogOpStack
 Stack to track the Logical Operator recursion nest for MC/DC.
 
SmallVector< llvm::IntrinsicInst *, 4 > ConvergenceTokenStack
 Stack to track the controlled convergence tokens.
 
int ExpectedOMPLoopDepth = 0
 Number of nested loop to be consumed by the last surrounding loop-associated directive.
 
const DeclCurFuncDecl = nullptr
 CurFuncDecl - Holds the Decl for the current outermost non-closure context.
 
const DeclCurCodeDecl = nullptr
 CurCodeDecl - This is the inner-most code context, which includes blocks.
 
const CGFunctionInfoCurFnInfo = nullptr
 
QualType FnRetTy
 
llvm::Function * CurFn = nullptr
 
llvm::SmallVector< const ParmVarDecl *, 4 > FnArgs
 Save Parameter Decl for coroutine.
 
CGCoroInfo CurCoro
 
AwaitSuspendWrapperInfo CurAwaitSuspendWrapper
 
GlobalDecl CurGD
 CurGD - The GlobalDecl for the current function being compiled.
 
EHScopeStack::stable_iterator PrologueCleanupDepth
 PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.
 
JumpDest ReturnBlock
 ReturnBlock - Unified return block.
 
Address ReturnValue = Address::invalid()
 ReturnValue - The temporary alloca to hold the return value.
 
Address ReturnValuePointer = Address::invalid()
 ReturnValuePointer - The temporary alloca to hold a pointer to sret.
 
const ExprRetExpr = nullptr
 If a return statement is being visited, this holds the return statment's result expression.
 
llvm::AssertingVH< llvm::Instruction > AllocaInsertPt
 AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas.
 
CGCapturedStmtInfoCapturedStmtInfo = nullptr
 
SanitizerSet SanOpts
 Sanitizers enabled for this function.
 
bool IsSanitizerScope = false
 True if CodeGen currently emits code implementing sanitizer checks.
 
bool CurFuncIsThunk = false
 In C++, whether we are code generating a thunk.
 
bool AutoreleaseResult = false
 In ARC, whether we should autorelease the return value.
 
bool SawAsmBlock = false
 Whether we processed a Microsoft-style asm block during CodeGen.
 
GlobalDecl CurSEHParent
 
bool IsOutlinedSEHHelper = false
 True if the current function is an outlined SEH helper.
 
bool IsInPreservedAIRegion = false
 True if CodeGen currently emits code inside presereved access index region.
 
bool InNoMergeAttributedStmt = false
 True if the current statement has nomerge attribute.
 
bool InNoInlineAttributedStmt = false
 True if the current statement has noinline attribute.
 
bool InAlwaysInlineAttributedStmt = false
 True if the current statement has always_inline attribute.
 
bool InNoConvergentAttributedStmt = false
 True if the current statement has noconvergent attribute.
 
const CallExprMustTailCall = nullptr
 
const CodeGen::CGBlockInfoBlockInfo = nullptr
 
llvm::Value * BlockPointer = nullptr
 
llvm::DenseMap< const ValueDecl *, FieldDecl * > LambdaCaptureFields
 
FieldDeclLambdaThisCaptureField = nullptr
 
llvm::DenseMap< const VarDecl *, llvm::Value * > NRVOFlags
 A mapping from NRVO variables to the flags used to indicate when the NRVO has been applied to this variable.
 
EHScopeStack EHStack
 
llvm::SmallVector< char, 256 > LifetimeExtendedCleanupStack
 
llvm::SmallVector< DeferredDeactivateCleanupDeferredDeactivationCleanupStack
 
llvm::SmallVector< const JumpDest *, 2 > SEHTryEpilogueStack
 
llvm::Instruction * CurrentFuncletPad = nullptr
 
RawAddress NormalCleanupDest = RawAddress::invalid()
 i32s containing the indexes of the cleanup destinations.
 
unsigned NextCleanupDestIndex = 1
 
llvm::BasicBlock * EHResumeBlock = nullptr
 EHResumeBlock - Unified block containing a call to llvm.eh.resume.
 
llvm::Value * ExceptionSlot = nullptr
 The exception slot.
 
llvm::AllocaInst * EHSelectorSlot = nullptr
 The selector slot.
 
SmallVector< Address, 1 > SEHCodeSlotStack
 A stack of exception code slots.
 
llvm::Value * SEHInfo = nullptr
 Value returned by __exception_info intrinsic.
 
const OMPExecutableDirectiveOMPParentLoopDirectiveForScan = nullptr
 Parent loop-based directive for scan directive.
 
llvm::BasicBlock * OMPBeforeScanBlock = nullptr
 
llvm::BasicBlock * OMPAfterScanBlock = nullptr
 
llvm::BasicBlock * OMPScanExitBlock = nullptr
 
llvm::BasicBlock * OMPScanDispatch = nullptr
 
bool OMPFirstScanLoop = false
 
FPOptions CurFPFeatures
 
SmallVector< llvm::Value *, 8 > ObjCEHValueStack
 ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows.
 
EHScopeStack::stable_iterator CurrentCleanupScopeDepth
 
CurrentSourceLocExprScope CurSourceLocExprScope
 Source location information about the default argument or member initializer expression we're evaluating, if any.
 
- Public Attributes inherited from clang::CodeGen::CodeGenTypeCache
llvm::Type * VoidTy
 void
 
llvm::IntegerType * Int8Ty
 i8, i16, i32, and i64
 
llvm::IntegerType * Int16Ty
 
llvm::IntegerType * Int32Ty
 
llvm::IntegerType * Int64Ty
 
llvm::Type * HalfTy
 half, bfloat, float, double
 
llvm::Type * BFloatTy
 
llvm::Type * FloatTy
 
llvm::Type * DoubleTy
 
llvm::IntegerType * IntTy
 int
 
llvm::IntegerType * CharTy
 char
 
union {
   llvm::IntegerType *   IntPtrTy
 
   llvm::IntegerType *   SizeTy
 
   llvm::IntegerType *   PtrDiffTy
 
}; 
 intptr_t, size_t, and ptrdiff_t, which we assume are the same size.
 
union {
   llvm::PointerType *   UnqualPtrTy
 
   llvm::PointerType *   VoidPtrTy
 
   llvm::PointerType *   Int8PtrTy
 
   llvm::PointerType *   VoidPtrPtrTy
 
   llvm::PointerType *   Int8PtrPtrTy
 
}; 
 void*, void** in the target's default address space (often 0)
 
union {
   llvm::PointerType *   AllocaVoidPtrTy
 
   llvm::PointerType *   AllocaInt8PtrTy
 
}; 
 void* in alloca address space
 
union {
   llvm::PointerType *   GlobalsVoidPtrTy
 
   llvm::PointerType *   GlobalsInt8PtrTy
 
}; 
 void* in default globals address space
 
llvm::PointerType * ConstGlobalsPtrTy
 void* in the address space for constant globals
 
union {
   unsigned char   IntSizeInBytes
 
   unsigned char   IntAlignInBytes
 
}; 
 The size and alignment of the builtin C type 'int'.
 
unsigned char PointerWidthInBits
 The width of a pointer into the generic address space.
 
union {
   unsigned char   PointerAlignInBytes
 
   unsigned char   PointerSizeInBytes
 
}; 
 The size and alignment of a pointer into the generic address space.
 
union {
   unsigned char   SizeSizeInBytes
 
   unsigned char   SizeAlignInBytes
 
}; 
 The size and alignment of size_t.
 
LangAS ASTAllocaAddressSpace
 
llvm::CallingConv::ID RuntimeCC
 

Static Public Attributes

static Destroyer destroyCXXObject
 
static Destroyer destroyARCStrongImprecise
 
static Destroyer destroyARCStrongPrecise
 
static Destroyer destroyARCWeak
 
static Destroyer emitARCIntrinsicUse
 
static Destroyer destroyNonTrivialCStruct
 

Friends

class CGCXXABI
 

Detailed Description

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code.

Definition at line 256 of file CodeGenFunction.h.

Member Typedef Documentation

◆ CodeGenDispatchBoundsTy

typedef llvm::function_ref<std::pair<llvm::Value *, llvm::Value *>( CodeGenFunction &, const OMPExecutableDirective &S, Address LB, Address UB)> clang::CodeGen::CodeGenFunction::CodeGenDispatchBoundsTy

Definition at line 341 of file CodeGenFunction.h.

◆ CodeGenLoopBoundsTy

Definition at line 335 of file CodeGenFunction.h.

◆ CodeGenLoopTy

Definition at line 327 of file CodeGenFunction.h.

◆ CodeGenOrderedTy

Definition at line 330 of file CodeGenFunction.h.

◆ ComplexPairTy

typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy

Definition at line 292 of file CodeGenFunction.h.

◆ DeclMapTy

typedef llvm::DenseMap<const Decl *, Address> clang::CodeGen::CodeGenFunction::DeclMapTy

Definition at line 1082 of file CodeGenFunction.h.

◆ Destroyer

typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, Address addr, QualType ty)

Definition at line 2190 of file CodeGenFunction.h.

◆ SourceLocExprScopeGuard

Definition at line 1748 of file CodeGenFunction.h.

◆ SpecialInitFn

typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address)

Definition at line 3342 of file CodeGenFunction.h.

◆ TaskGenTy

typedef const llvm::function_ref<void(CodeGenFunction & , llvm::Function * , const OMPTaskDataTy & )> clang::CodeGen::CodeGenFunction::TaskGenTy

Definition at line 3790 of file CodeGenFunction.h.

◆ VisitedVirtualBasesSetTy

Definition at line 2448 of file CodeGenFunction.h.

◆ VPtrsVector

Definition at line 2446 of file CodeGenFunction.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

An enumeration which makes it easier to specify whether or not an operation is a subtraction.

Enumerator
NotSubtraction 
IsSubtraction 

Definition at line 5050 of file CodeGenFunction.h.

◆ BuiltinCheckKind

Specifies which type of sanitizer check to apply when handling a particular builtin.

Enumerator
BCK_CTZPassedZero 
BCK_CLZPassedZero 

Definition at line 5071 of file CodeGenFunction.h.

◆ CFITypeCheckKind

Enumerator
CFITCK_VCall 
CFITCK_NVCall 
CFITCK_DerivedCast 
CFITCK_UnrelatedCast 
CFITCK_ICall 
CFITCK_NVMFCall 
CFITCK_VMFCall 

Definition at line 2474 of file CodeGenFunction.h.

◆ EvaluationOrder

Enumerator
Default 

! No language constraints on evaluation order.

ForceLeftToRight 

! Language semantics require left-to-right evaluation.

ForceRightToLeft 

! Language semantics require right-to-left evaluation.

Definition at line 5250 of file CodeGenFunction.h.

◆ ExprValueKind

Enumerator
EVK_RValue 
EVK_NonRValue 

Definition at line 4844 of file CodeGenFunction.h.

◆ GuardKind

Enumerator
VariableGuard 
TlsGuard 

Definition at line 4932 of file CodeGenFunction.h.

◆ TypeCheckKind

Situations in which we might emit a check for the suitability of a pointer or glvalue.

Needs to be kept in sync with ubsan_handlers.cpp in compiler-rt.

Enumerator
TCK_Load 

Checking the operand of a load. Must be suitably sized and aligned.

TCK_Store 

Checking the destination of a store. Must be suitably sized and aligned.

TCK_ReferenceBinding 

Checking the bound value in a reference binding.

Must be suitably sized and aligned, but is not required to refer to an object (until the reference is used), per core issue 453.

TCK_MemberAccess 

Checking the object expression in a non-static data member access.

Must be an object within its lifetime.

TCK_MemberCall 

Checking the 'this' pointer for a call to a non-static member function.

Must be an object within its lifetime.

TCK_ConstructorCall 

Checking the 'this' pointer for a constructor call.

TCK_DowncastPointer 

Checking the operand of a static_cast to a derived pointer type.

Must be null or an object within its lifetime.

TCK_DowncastReference 

Checking the operand of a static_cast to a derived reference type.

Must be an object within its lifetime.

TCK_Upcast 

Checking the operand of a cast to a base object.

Must be suitably sized and aligned.

TCK_UpcastToVirtualBase 

Checking the operand of a cast to a virtual base object.

Must be an object within its lifetime.

TCK_NonnullAssign 

Checking the value assigned to a _Nonnull pointer. Must not be null.

TCK_DynamicOperation 

Checking the operand of a dynamic_cast or a typeid expression.

Must be null or an object within its lifetime.

Definition at line 3219 of file CodeGenFunction.h.

◆ VTableAuthMode

Enumerator
Authenticate 
MustTrap 
UnsafeUbsanStrip 

Definition at line 2462 of file CodeGenFunction.h.

Constructor & Destructor Documentation

◆ CodeGenFunction()

clang::CodeGen::CodeGenFunction::CodeGenFunction ( CodeGenModule cgm,
bool  suppressNewContext = false 
)

◆ ~CodeGenFunction()

clang::CodeGen::CodeGenFunction::~CodeGenFunction ( )

Member Function Documentation

◆ ActivateCleanupBlock()

void clang::CodeGen::CodeGenFunction::ActivateCleanupBlock ( EHScopeStack::stable_iterator  Cleanup,
llvm::Instruction *  DominatingIP 
)

ActivateCleanupBlock - Activates an initially-inactive cleanup.

Cannot be used to resurrect a deactivated cleanup.

Parameters
DominatingIP- An instruction which is known to dominate the current IP (if set) and which lies along all paths of execution between the current IP and the the point at which the cleanup comes into scope.

◆ AddAMDGPUFenceAddressSpaceMMRA()

void clang::CodeGen::CodeGenFunction::AddAMDGPUFenceAddressSpaceMMRA ( llvm::Instruction *  Inst,
const CallExpr E 
)

◆ addControlledConvergenceToken()

template<typename CallType >
CallType * clang::CodeGen::CodeGenFunction::addControlledConvergenceToken ( CallType *  Input)
inline

Definition at line 5166 of file CodeGenFunction.h.

References ConvergenceTokenStack.

◆ AddInitializerToStaticVarDecl()

llvm::GlobalVariable * clang::CodeGen::CodeGenFunction::AddInitializerToStaticVarDecl ( const VarDecl D,
llvm::GlobalVariable *  GV 
)

AddInitializerToStaticVarDecl - Add the initializer for 'D' to the global variable that has already been created for it.

If the initializer has a different type than GV does, this may free GV and return a different one. Otherwise it just returns GV.

◆ AlwaysEmitXRayCustomEvents()

bool clang::CodeGen::CodeGenFunction::AlwaysEmitXRayCustomEvents ( ) const

AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls.

◆ AlwaysEmitXRayTypedEvents()

bool clang::CodeGen::CodeGenFunction::AlwaysEmitXRayTypedEvents ( ) const

AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls.

◆ authPointerToPointerCast() [1/2]

Address clang::CodeGen::CodeGenFunction::authPointerToPointerCast ( Address  Ptr,
QualType  SourceType,
QualType  DestType 
)

◆ authPointerToPointerCast() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::authPointerToPointerCast ( llvm::Value *  ResultPtr,
QualType  SourceType,
QualType  DestType 
)

◆ BuildAppleKextVirtualCall()

CGCallee clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualCall ( const CXXMethodDecl MD,
NestedNameSpecifier Qual,
llvm::Type *  Ty 
)

◆ BuildAppleKextVirtualDestructorCall()

CGCallee clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualDestructorCall ( const CXXDestructorDecl DD,
CXXDtorType  Type,
const CXXRecordDecl RD 
)

◆ BuildBlockRelease()

void clang::CodeGen::CodeGenFunction::BuildBlockRelease ( llvm::Value *  DeclPtr,
BlockFieldFlags  flags,
bool  CanThrow 
)

◆ BuildFunctionArgList()

QualType clang::CodeGen::CodeGenFunction::BuildFunctionArgList ( GlobalDecl  GD,
FunctionArgList Args 
)

◆ BuildVector()

llvm::Value * clang::CodeGen::CodeGenFunction::BuildVector ( ArrayRef< llvm::Value * >  Ops)

◆ callCStructCopyAssignmentOperator()

void clang::CodeGen::CodeGenFunction::callCStructCopyAssignmentOperator ( LValue  Dst,
LValue  Src 
)

◆ callCStructCopyConstructor()

void clang::CodeGen::CodeGenFunction::callCStructCopyConstructor ( LValue  Dst,
LValue  Src 
)

◆ callCStructDefaultConstructor()

void clang::CodeGen::CodeGenFunction::callCStructDefaultConstructor ( LValue  Dst)

◆ callCStructDestructor()

void clang::CodeGen::CodeGenFunction::callCStructDestructor ( LValue  Dst)

◆ callCStructMoveAssignmentOperator()

void clang::CodeGen::CodeGenFunction::callCStructMoveAssignmentOperator ( LValue  Dst,
LValue  Src 
)

◆ callCStructMoveConstructor()

void clang::CodeGen::CodeGenFunction::callCStructMoveConstructor ( LValue  Dst,
LValue  Src 
)

◆ checkIfFunctionMustProgress()

bool clang::CodeGen::CodeGenFunction::checkIfFunctionMustProgress ( )
inline

Returns true if a function must make progress, which means the mustprogress attribute can be added.

Definition at line 624 of file CodeGenFunction.h.

References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLangOpts(), and clang::CodeGenOptions::Never.

◆ checkIfLoopMustProgress()

bool clang::CodeGen::CodeGenFunction::checkIfLoopMustProgress ( const Expr ,
bool  HasEmptyBody 
)

Returns true if a loop must make progress, which means the mustprogress attribute can be added.

HasConstantCond indicates whether the branch condition is a known constant.

◆ checkTargetFeatures() [1/2]

void clang::CodeGen::CodeGenFunction::checkTargetFeatures ( const CallExpr E,
const FunctionDecl TargetDecl 
)

◆ checkTargetFeatures() [2/2]

void clang::CodeGen::CodeGenFunction::checkTargetFeatures ( SourceLocation  Loc,
const FunctionDecl TargetDecl 
)

◆ ConstantFoldsToSimpleInteger() [1/2]

bool clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr Cond,
bool Result,
bool  AllowLabels = false 
)

ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.

If it constant folds return true and set the boolean result in Result.

Referenced by emitCommonOMPTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), and emitOMPSimdRegion().

◆ ConstantFoldsToSimpleInteger() [2/2]

bool clang::CodeGen::CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr Cond,
llvm::APSInt &  Result,
bool  AllowLabels = false 
)

ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.

If it constant folds return true and set the folded value.

◆ containsBreak()

static bool clang::CodeGen::CodeGenFunction::containsBreak ( const Stmt S)
static

containsBreak - Return true if the statement contains a break out of it.

If the statement (recursively) contains a switch or loop with a break inside of it, this is fine.

Referenced by CollectStatementsForCase().

◆ ContainsLabel()

static bool clang::CodeGen::CodeGenFunction::ContainsLabel ( const Stmt S,
bool  IgnoreCaseStmts = false 
)
static

ContainsLabel - Return true if the statement contains a label in it.

If this statement is not executed normally, it not containing a label means that we can just remove the code.

Referenced by CollectStatementsForCase(), and FindCaseStatementsForValue().

◆ convertTempToRValue()

RValue clang::CodeGen::CodeGenFunction::convertTempToRValue ( Address  addr,
QualType  type,
SourceLocation  Loc 
)

◆ ConvertType() [1/2]

llvm::Type * clang::CodeGen::CodeGenFunction::ConvertType ( const TypeDecl T)
inline

Definition at line 2584 of file CodeGenFunction.h.

References ConvertType(), getContext(), and clang::T.

◆ ConvertType() [2/2]

llvm::Type * clang::CodeGen::CodeGenFunction::ConvertType ( QualType  T)

◆ convertTypeForLoadStore()

llvm::Type * clang::CodeGen::CodeGenFunction::convertTypeForLoadStore ( QualType  ASTTy,
llvm::Type *  LLVMTy = nullptr 
)

◆ ConvertTypeForMem()

llvm::Type * clang::CodeGen::CodeGenFunction::ConvertTypeForMem ( QualType  T)

Referenced by castValueToType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), complexTempStructure(), createPlaceholderSlot(), emitAddrOfVarFromArray(), emitArraySubscriptGEP(), clang::CodeGen::ReductionCodeGen::emitCleanups(), EmitDeclDestroy(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitOMPArraySectionBase(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitPointerWithAlignment(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceInitFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::emitVoidPtrVAArg(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::getVAListElementType(), InitCatchParam(), loadToBegin(), makeNaturalAddressForPointer(), makeNaturalAlignAddrLValue(), MakeRawAddrLValue(), and PerformReturnAdjustment().

◆ CreateAggTemp()

AggValueSlot clang::CodeGen::CodeGenFunction::CreateAggTemp ( QualType  T,
const Twine &  Name = "tmp",
RawAddress Alloca = nullptr 
)
inline

◆ createAtExitStub()

llvm::Constant * clang::CodeGen::CodeGenFunction::createAtExitStub ( const VarDecl VD,
llvm::FunctionCallee  Dtor,
llvm::Constant *  Addr 
)

◆ createBasicBlock()

llvm::BasicBlock * clang::CodeGen::CodeGenFunction::createBasicBlock ( const Twine &  name = "",
llvm::Function *  parent = nullptr,
llvm::BasicBlock *  before = nullptr 
)
inline

◆ createCleanupActiveFlag()

RawAddress clang::CodeGen::CodeGenFunction::createCleanupActiveFlag ( )

◆ CreateCoercedStore()

void clang::CodeGen::CodeGenFunction::CreateCoercedStore ( llvm::Value *  Src,
Address  Dst,
llvm::TypeSize  DstSize,
bool  DstIsVolatile 
)

Create a store to.

  • DstPtr from
  • Src, truncating the stored value to at most
  • DstSize bytes.

◆ CreateDefaultAlignTempAlloca()

RawAddress clang::CodeGen::CodeGenFunction::CreateDefaultAlignTempAlloca ( llvm::Type *  Ty,
const Twine &  Name = "tmp" 
)

CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type.

IMPORTANT NOTE: This is not generally the right alignment for any given AST type that happens to have been lowered to the given IR type. This should only ever be used for function-local, IR-driven manipulations like saving and restoring a value. Do not hand this address off to arbitrary IRGen routines, and especially do not pass it as an argument to a function that might expect a properly ABI-aligned value.

Referenced by clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), and clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall().

◆ CreateIRTemp()

RawAddress clang::CodeGen::CodeGenFunction::CreateIRTemp ( QualType  T,
const Twine &  Name = "tmp" 
)

CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment.

This routine should only be used when an temporary value needs to be stored into an alloca (for example, to avoid explicit PHI construction), but the type is the IR type, not the type appropriate for storing in memory.

That is, this is exactly equivalent to CreateMemTemp, but calling ConvertType instead of ConvertTypeForMem.

Referenced by maybeCreateMCDCCondBitmap().

◆ CreateMemTemp() [1/2]

RawAddress clang::CodeGen::CodeGenFunction::CreateMemTemp ( QualType  T,
CharUnits  Align,
const Twine &  Name = "tmp",
RawAddress Alloca = nullptr 
)

◆ CreateMemTemp() [2/2]

RawAddress clang::CodeGen::CodeGenFunction::CreateMemTemp ( QualType  T,
const Twine &  Name = "tmp",
RawAddress Alloca = nullptr 
)

◆ CreateMemTempWithoutCast() [1/2]

RawAddress clang::CodeGen::CodeGenFunction::CreateMemTempWithoutCast ( QualType  T,
CharUnits  Align,
const Twine &  Name = "tmp" 
)

◆ CreateMemTempWithoutCast() [2/2]

RawAddress clang::CodeGen::CodeGenFunction::CreateMemTempWithoutCast ( QualType  T,
const Twine &  Name = "tmp" 
)

CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.

◆ CreateTempAlloca() [1/2]

RawAddress clang::CodeGen::CodeGenFunction::CreateTempAlloca ( llvm::Type *  Ty,
CharUnits  align,
const Twine &  Name = "tmp",
llvm::Value *  ArraySize = nullptr,
RawAddress Alloca = nullptr 
)

◆ CreateTempAlloca() [2/2]

llvm::AllocaInst * clang::CodeGen::CodeGenFunction::CreateTempAlloca ( llvm::Type *  Ty,
const Twine &  Name = "tmp",
llvm::Value *  ArraySize = nullptr 
)

CreateTempAlloca - This creates an alloca and inserts it into the entry block if ArraySize is nullptr, otherwise inserts it at the current insertion point of the builder.

The caller is responsible for setting an appropriate alignment on the alloca.

ArraySize is the number of array elements to be allocated if it is not nullptr.

LangAS::Default is the address space of pointers to local variables and temporaries, as exposed in the source language. In certain configurations, this is not the same as the alloca address space, and a cast is needed to lift the pointer from the alloca AS into LangAS::Default. This can happen when the target uses a restricted address space for the stack but the source language requires LangAS::Default to be a generic address space. The latter condition is common for most programming languages; OpenCL is an exception in that LangAS::Default is the private address space, which naturally maps to the stack.

Because the address of a temporary is often exposed to the program in various ways, this function will perform the cast. The original alloca instruction is returned through Alloca if it is not nullptr.

The cast is not performaed in CreateTempAllocaWithoutCast. This is more efficient if the caller knows that the address will not be exposed.

Referenced by CreateTempAllocaForCoercion(), emitSuspendExpression(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), InitCatchParam(), clang::CodeGen::DominatingLLVMValue::save(), and SetupCleanupBlockActivation().

◆ CreateTempAllocaWithoutCast()

RawAddress clang::CodeGen::CodeGenFunction::CreateTempAllocaWithoutCast ( llvm::Type *  Ty,
CharUnits  align,
const Twine &  Name = "tmp",
llvm::Value *  ArraySize = nullptr 
)

◆ createTLSAtExitStub()

llvm::Function * clang::CodeGen::CodeGenFunction::createTLSAtExitStub ( const VarDecl VD,
llvm::FunctionCallee  Dtor,
llvm::Constant *  Addr,
llvm::FunctionCallee &  AtExit 
)

◆ currentFunctionUsesSEHTry()

bool clang::CodeGen::CodeGenFunction::currentFunctionUsesSEHTry ( ) const
inline

Definition at line 2178 of file CodeGenFunction.h.

References CurSEHParent.

Referenced by findDominatingStoreToReturnValue().

◆ cxxDestructorCanThrow()

static bool clang::CodeGen::CodeGenFunction::cxxDestructorCanThrow ( QualType  T)
static

Check if T is a C++ class that has a destructor that can throw.

Referenced by getBlockCaptureStr(), and pushCaptureCleanup().

◆ DeactivateCleanupBlock()

void clang::CodeGen::CodeGenFunction::DeactivateCleanupBlock ( EHScopeStack::stable_iterator  Cleanup,
llvm::Instruction *  DominatingIP 
)

DeactivateCleanupBlock - Deactivates the given cleanup block.

The block cannot be reactivated. Pops it if it's the top of the stack.

Parameters
DominatingIP- An instruction which is known to dominate the current IP (if set) and which lies along all paths of execution between the current IP and the the point at which the cleanup comes into scope.

Referenced by deactivateArgCleanupsBeforeCall(), and clang::CodeGen::CodeGenFunction::CleanupDeactivationScope::ForceDeactivate().

◆ defaultInitNonTrivialCStructVar()

void clang::CodeGen::CodeGenFunction::defaultInitNonTrivialCStructVar ( LValue  Dst)

◆ disableDebugInfo()

void clang::CodeGen::CodeGenFunction::disableDebugInfo ( )
inline

Definition at line 2144 of file CodeGenFunction.h.

◆ EmitAArch64BuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr ( unsigned  BuiltinID,
const CallExpr E,
llvm::Triple::ArchType  Arch 
)

◆ EmitAArch64CompareBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAArch64CompareBuiltinExpr ( llvm::Value *  Op,
llvm::Type *  Ty,
const llvm::CmpInst::Predicate  Fp,
const llvm::CmpInst::Predicate  Ip,
const llvm::Twine &  Name = "" 
)

◆ EmitAArch64MultiVersionResolver()

void clang::CodeGen::CodeGenFunction::EmitAArch64MultiVersionResolver ( llvm::Function *  Resolver,
ArrayRef< MultiVersionResolverOption Options 
)

◆ EmitAArch64SMEBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAArch64SMEBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

◆ EmitAArch64SVEBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAArch64SVEBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

◆ emitAddrOfImagComponent()

Address clang::CodeGen::CodeGenFunction::emitAddrOfImagComponent ( Address  complex,
QualType  complexType 
)

◆ emitAddrOfRealComponent()

Address clang::CodeGen::CodeGenFunction::emitAddrOfRealComponent ( Address  complex,
QualType  complexType 
)

◆ EmitAggExpr()

void clang::CodeGen::CodeGenFunction::EmitAggExpr ( const Expr E,
AggValueSlot  AS 
)

EmitAggExpr - Emit the computation of the specified expression of aggregate type.

The result is computed into the given slot, which may be null to indicate that the value is not needed.

Referenced by EmitBaseInitializer(), EmitDeclInit(), emitPseudoObjectExpr(), InitCatchParam(), and StoreAnyExprIntoOneUnit().

◆ EmitAggExprToLValue()

LValue clang::CodeGen::CodeGenFunction::EmitAggExprToLValue ( const Expr E)

EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.

◆ EmitAggFinalDestCopy()

void clang::CodeGen::CodeGenFunction::EmitAggFinalDestCopy ( QualType  Type,
AggValueSlot  Dest,
const LValue Src,
ExprValueKind  SrcKind 
)

EmitAggFinalDestCopy - Emit copy of the specified aggregate into destination address.

◆ EmitAggregateAssign()

void clang::CodeGen::CodeGenFunction::EmitAggregateAssign ( LValue  Dest,
LValue  Src,
QualType  EltTy 
)
inline

Emit an aggregate assignment.

Definition at line 2963 of file CodeGenFunction.h.

References EmitAggregateCopy(), hasVolatileMember(), and clang::CodeGen::AggValueSlot::MayOverlap.

Referenced by emitPrivatesInit().

◆ EmitAggregateCopy()

void clang::CodeGen::CodeGenFunction::EmitAggregateCopy ( LValue  Dest,
LValue  Src,
QualType  EltTy,
AggValueSlot::Overlap_t  MayOverlap,
bool  isVolatile = false 
)

EmitAggregateCopy - Emit an aggregate copy.

Parameters
isVolatiletrue iff either the source or the destination is volatile.
MayOverlapWhether the tail padding of the destination might be occupied by some other object. More efficient code can often be generated if not.

Referenced by clang::CodeGen::CallArg::copyInto(), EmitAggregateAssign(), EmitAggregateCopyCtor(), EmitMemberInitializer(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CallArg::getRValue(), and InitCatchParam().

◆ EmitAggregateCopyCtor()

void clang::CodeGen::CodeGenFunction::EmitAggregateCopyCtor ( LValue  Dest,
LValue  Src,
AggValueSlot::Overlap_t  MayOverlap 
)
inline

Definition at line 2968 of file CodeGenFunction.h.

References EmitAggregateCopy(), and clang::CodeGen::LValue::getType().

◆ emitAlignmentAssumption() [1/2]

void clang::CodeGen::CodeGenFunction::emitAlignmentAssumption ( llvm::Value *  PtrValue,
const Expr E,
SourceLocation  AssumptionLoc,
llvm::Value *  Alignment,
llvm::Value *  OffsetValue = nullptr 
)

◆ emitAlignmentAssumption() [2/2]

void clang::CodeGen::CodeGenFunction::emitAlignmentAssumption ( llvm::Value *  PtrValue,
QualType  Ty,
SourceLocation  Loc,
SourceLocation  AssumptionLoc,
llvm::Value *  Alignment,
llvm::Value *  OffsetValue = nullptr 
)

Referenced by emitAlignedClause().

◆ emitAlignmentAssumptionCheck()

void clang::CodeGen::CodeGenFunction::emitAlignmentAssumptionCheck ( llvm::Value *  Ptr,
QualType  Ty,
SourceLocation  Loc,
SourceLocation  AssumptionLoc,
llvm::Value *  Alignment,
llvm::Value *  OffsetValue,
llvm::Value *  TheCheck,
llvm::Instruction *  Assumption 
)

◆ EmitAMDGPUBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

◆ EmitAMDGPUDevicePrintfCallExpr()

RValue clang::CodeGen::CodeGenFunction::EmitAMDGPUDevicePrintfCallExpr ( const CallExpr E)

◆ EmitAndRegisterVariableArrayDimensions()

void clang::CodeGen::CodeGenFunction::EmitAndRegisterVariableArrayDimensions ( CGDebugInfo DI,
const VarDecl D,
bool  EmitDebugInfo 
)

Emits the alloca and debug information for the size expressions for each dimension of an array.

It registers the association of its (1-dimensional) QualTypes and size expression's debug node, so that CGDebugInfo can reference this node when creating the DISubrange object to describe the array types.

◆ EmitAnnotationCall()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitAnnotationCall ( llvm::Function *  AnnotationFn,
llvm::Value *  AnnotatedVal,
StringRef  AnnotationStr,
SourceLocation  Location,
const AnnotateAttr *  Attr 
)

Emit an annotation call (intrinsic).

◆ EmitAnyExpr()

RValue clang::CodeGen::CodeGenFunction::EmitAnyExpr ( const Expr E,
AggValueSlot  aggSlot = AggValueSlot::ignored(),
bool  ignoreResult = false 
)

EmitAnyExpr - Emit code to compute the specified expression which can have any type.

The result is returned as an RValue struct. If this is an aggregate expression, the aggloc/agglocvolatile arguments indicate where the result should be returned.

Parameters
ignoreResultTrue if the resulting value isn't used.

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), emitPseudoObjectExpr(), emitSimdlenSafelenClause(), and emitSuspendExpression().

◆ EmitAnyExprToExn()

void clang::CodeGen::CodeGenFunction::EmitAnyExprToExn ( const Expr E,
Address  Addr 
)

◆ EmitAnyExprToMem()

void clang::CodeGen::CodeGenFunction::EmitAnyExprToMem ( const Expr E,
Address  Location,
Qualifiers  Quals,
bool  IsInitializer 
)

◆ EmitAnyExprToTemp()

RValue clang::CodeGen::CodeGenFunction::EmitAnyExprToTemp ( const Expr E)

EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.

◆ EmitARCAutorelease()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCAutorelease ( llvm::Value *  value)

◆ EmitARCAutoreleaseReturnValue()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCAutoreleaseReturnValue ( llvm::Value *  value)

Referenced by emitAutoreleaseOfResult().

◆ emitARCCopyAssignWeak()

void clang::CodeGen::CodeGenFunction::emitARCCopyAssignWeak ( QualType  Ty,
Address  DstAddr,
Address  SrcAddr 
)

◆ EmitARCCopyWeak()

void clang::CodeGen::CodeGenFunction::EmitARCCopyWeak ( Address  dst,
Address  src 
)

Referenced by tryEmitARCCopyWeakInit().

◆ EmitARCDestroyStrong()

void clang::CodeGen::CodeGenFunction::EmitARCDestroyStrong ( Address  addr,
ARCPreciseLifetime_t  precise 
)

Referenced by EmitObjectDelete().

◆ EmitARCDestroyWeak()

void clang::CodeGen::CodeGenFunction::EmitARCDestroyWeak ( Address  addr)

Referenced by EmitObjectDelete().

◆ EmitARCExtendBlockObject()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCExtendBlockObject ( const Expr expr)

◆ EmitARCInitWeak()

void clang::CodeGen::CodeGenFunction::EmitARCInitWeak ( Address  addr,
llvm::Value *  value 
)

◆ EmitARCIntrinsicUse()

void clang::CodeGen::CodeGenFunction::EmitARCIntrinsicUse ( ArrayRef< llvm::Value * >  values)

Referenced by emitWriteback().

◆ EmitARCLoadWeak()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCLoadWeak ( Address  addr)

◆ EmitARCLoadWeakRetained()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCLoadWeakRetained ( Address  addr)

◆ emitARCMoveAssignWeak()

void clang::CodeGen::CodeGenFunction::emitARCMoveAssignWeak ( QualType  Ty,
Address  DstAddr,
Address  SrcAddr 
)

◆ EmitARCMoveWeak()

void clang::CodeGen::CodeGenFunction::EmitARCMoveWeak ( Address  dst,
Address  src 
)

Referenced by tryEmitARCCopyWeakInit().

◆ EmitARCNoopIntrinsicUse()

void clang::CodeGen::CodeGenFunction::EmitARCNoopIntrinsicUse ( ArrayRef< llvm::Value * >  values)

◆ EmitARCReclaimReturnedObject()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCReclaimReturnedObject ( const Expr e,
bool  allowUnsafeClaim 
)

◆ EmitARCRelease()

void clang::CodeGen::CodeGenFunction::EmitARCRelease ( llvm::Value *  value,
ARCPreciseLifetime_t  precise 
)

◆ EmitARCRetain()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetain ( QualType  type,
llvm::Value *  value 
)

◆ EmitARCRetainAutorelease()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainAutorelease ( QualType  type,
llvm::Value *  value 
)

◆ EmitARCRetainAutoreleasedReturnValue()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleasedReturnValue ( llvm::Value *  value)

Referenced by emitARCRetainCallResult().

◆ EmitARCRetainAutoreleaseNonBlock()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseNonBlock ( llvm::Value *  value)

◆ EmitARCRetainAutoreleaseReturnValue()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseReturnValue ( llvm::Value *  value)

◆ EmitARCRetainAutoreleaseScalarExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr ( const Expr expr)

◆ EmitARCRetainBlock()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainBlock ( llvm::Value *  value,
bool  mandatory 
)

◆ EmitARCRetainNonBlock()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainNonBlock ( llvm::Value *  value)

◆ EmitARCRetainScalarExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCRetainScalarExpr ( const Expr expr)

◆ EmitARCStoreAutoreleasing()

std::pair< LValue, llvm::Value * > clang::CodeGen::CodeGenFunction::EmitARCStoreAutoreleasing ( const BinaryOperator e)

◆ EmitARCStoreStrong() [1/2]

std::pair< LValue, llvm::Value * > clang::CodeGen::CodeGenFunction::EmitARCStoreStrong ( const BinaryOperator e,
bool  ignored 
)

◆ EmitARCStoreStrong() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCStoreStrong ( LValue  lvalue,
llvm::Value *  value,
bool  resultIgnored 
)

◆ EmitARCStoreStrongCall()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCStoreStrongCall ( Address  addr,
llvm::Value *  value,
bool  resultIgnored 
)

◆ EmitARCStoreUnsafeUnretained()

std::pair< LValue, llvm::Value * > clang::CodeGen::CodeGenFunction::EmitARCStoreUnsafeUnretained ( const BinaryOperator e,
bool  ignored 
)

◆ EmitARCStoreWeak()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCStoreWeak ( Address  addr,
llvm::Value *  value,
bool  ignored 
)

◆ EmitARCUnsafeClaimAutoreleasedReturnValue()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCUnsafeClaimAutoreleasedReturnValue ( llvm::Value *  value)

◆ EmitARCUnsafeUnretainedScalarExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr ( const Expr expr)

◆ EmitARMBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue,
llvm::Triple::ArchType  Arch 
)

◆ EmitARMCDEBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARMCDEBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue,
llvm::Triple::ArchType  Arch 
)

◆ EmitARMMVEBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitARMMVEBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue,
llvm::Triple::ArchType  Arch 
)

◆ emitArrayDestroy()

void clang::CodeGen::CodeGenFunction::emitArrayDestroy ( llvm::Value *  begin,
llvm::Value *  end,
QualType  elementType,
CharUnits  elementAlign,
Destroyer destroyer,
bool  checkZeroLength,
bool  useEHCleanup 
)

◆ emitArrayLength()

llvm::Value * clang::CodeGen::CodeGenFunction::emitArrayLength ( const ArrayType arrayType,
QualType baseType,
Address addr 
)

emitArrayLength - Compute the length of an array, even if it's a VLA, and drill down to the base element type.

Referenced by EmitOMPAggregateInit(), and EmitOMPAggregateReduction().

◆ EmitArraySectionExpr()

LValue clang::CodeGen::CodeGenFunction::EmitArraySectionExpr ( const ArraySectionExpr E,
bool  IsLowerBound = true 
)

◆ EmitArraySubscriptExpr()

LValue clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr ( const ArraySubscriptExpr E,
bool  Accessed = false 
)

◆ EmitArrayToPointerDecay()

Address clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay ( const Expr Array,
LValueBaseInfo BaseInfo = nullptr,
TBAAAccessInfo TBAAInfo = nullptr 
)

◆ EmitAsanPrologueOrEpilogue()

void clang::CodeGen::CodeGenFunction::EmitAsanPrologueOrEpilogue ( bool  Prologue)

◆ EmitAsmStmt()

void clang::CodeGen::CodeGenFunction::EmitAsmStmt ( const AsmStmt S)

◆ EmitAtomicCompareExchange()

std::pair< RValue, llvm::Value * > clang::CodeGen::CodeGenFunction::EmitAtomicCompareExchange ( LValue  Obj,
RValue  Expected,
RValue  Desired,
SourceLocation  Loc,
llvm::AtomicOrdering  Success = llvm::AtomicOrdering::SequentiallyConsistent,
llvm::AtomicOrdering  Failure = llvm::AtomicOrdering::SequentiallyConsistent,
bool  IsWeak = false,
AggValueSlot  Slot = AggValueSlot::ignored() 
)

◆ EmitAtomicExpr()

RValue clang::CodeGen::CodeGenFunction::EmitAtomicExpr ( AtomicExpr E)

◆ EmitAtomicInit()

void clang::CodeGen::CodeGenFunction::EmitAtomicInit ( Expr E,
LValue  lvalue 
)

◆ EmitAtomicLoad() [1/2]

RValue clang::CodeGen::CodeGenFunction::EmitAtomicLoad ( LValue  LV,
SourceLocation  SL,
AggValueSlot  Slot = AggValueSlot::ignored() 
)

Referenced by emitSimpleAtomicLoad().

◆ EmitAtomicLoad() [2/2]

RValue clang::CodeGen::CodeGenFunction::EmitAtomicLoad ( LValue  lvalue,
SourceLocation  loc,
llvm::AtomicOrdering  AO,
bool  IsVolatile = false,
AggValueSlot  slot = AggValueSlot::ignored() 
)

◆ emitAtomicRMWInst()

llvm::AtomicRMWInst * clang::CodeGen::CodeGenFunction::emitAtomicRMWInst ( llvm::AtomicRMWInst::BinOp  Op,
Address  Addr,
llvm::Value *  Val,
llvm::AtomicOrdering  Order = llvm::AtomicOrdering::SequentiallyConsistent,
llvm::SyncScope::ID  SSID = llvm::SyncScope::System 
)

Emit an atomicrmw instruction, and applying relevant metadata when applicable.

Referenced by EmitAtomicOp(), and emitOMPAtomicRMW().

◆ EmitAtomicStore() [1/2]

void clang::CodeGen::CodeGenFunction::EmitAtomicStore ( RValue  rvalue,
LValue  lvalue,
bool  isInit 
)

◆ EmitAtomicStore() [2/2]

void clang::CodeGen::CodeGenFunction::EmitAtomicStore ( RValue  rvalue,
LValue  lvalue,
llvm::AtomicOrdering  AO,
bool  IsVolatile,
bool  isInit 
)

◆ EmitAtomicUpdate()

void clang::CodeGen::CodeGenFunction::EmitAtomicUpdate ( LValue  LVal,
llvm::AtomicOrdering  AO,
const llvm::function_ref< RValue(RValue)> &  UpdateOp,
bool  IsVolatile 
)

◆ EmitAttributedStmt()

void clang::CodeGen::CodeGenFunction::EmitAttributedStmt ( const AttributedStmt S)

◆ EmitAutoVarAlloca()

AutoVarEmission clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca ( const VarDecl var)

◆ EmitAutoVarCleanups()

void clang::CodeGen::CodeGenFunction::EmitAutoVarCleanups ( const AutoVarEmission emission)

◆ EmitAutoVarDecl()

void clang::CodeGen::CodeGenFunction::EmitAutoVarDecl ( const VarDecl D)

EmitAutoVarDecl - Emit an auto variable declaration.

This function can be called with a null (unreachable) insert point.

Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt().

◆ EmitAutoVarInit()

void clang::CodeGen::CodeGenFunction::EmitAutoVarInit ( const AutoVarEmission emission)

◆ emitAutoVarTypeCleanup()

void clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup ( const AutoVarEmission emission,
QualType::DestructionKind  dtorKind 
)

◆ EmitBinaryOperatorLValue()

LValue clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue ( const BinaryOperator E)

◆ EmitBitfieldConversionCheck()

void clang::CodeGen::CodeGenFunction::EmitBitfieldConversionCheck ( llvm::Value *  Src,
QualType  SrcType,
llvm::Value *  Dst,
QualType  DstType,
const CGBitFieldInfo Info,
SourceLocation  Loc 
)

Emit a check that an [implicit] conversion of a bitfield.

It is not UB, so we use the value after conversion.

◆ EmitBlock()

void clang::CodeGen::CodeGenFunction::EmitBlock ( llvm::BasicBlock *  BB,
bool  IsFinished = false 
)

EmitBlock - Emit the given block.

  • BB and set it as the insert point, adding a fall-through branch from the current insert block if necessary. It is legal to call this function even if there is no current insertion point.

IsFinished - If true, indicates that the caller has finished emitting branches to the given block and does not expect to emit code into it. This means the block can be ignored if it is unreachable.

Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), clang::CodeGen::CatchRetScope::Emit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), emitCatchDispatchBlock(), EmitCleanup(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitNonZeroVLAInit(), EmitObjectDelete(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPSimdRegion(), emitPostUpdateForReductionClause(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), EmitSehScope(), emitSuspendExpression(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), and PerformReturnAdjustment().

◆ EmitBlockAfterUses()

void clang::CodeGen::CodeGenFunction::EmitBlockAfterUses ( llvm::BasicBlock *  BB)

EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it.

Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), emitFilterDispatchBlock(), and emitWasmCatchPadBlock().

◆ emitBlockByrefAddress() [1/2]

Address clang::CodeGen::CodeGenFunction::emitBlockByrefAddress ( Address  baseAddr,
const BlockByrefInfo info,
bool  followForward,
const llvm::Twine &  name 
)

◆ emitBlockByrefAddress() [2/2]

Address clang::CodeGen::CodeGenFunction::emitBlockByrefAddress ( Address  baseAddr,
const VarDecl V,
bool  followForward = true 
)

BuildBlockByrefAddress - Computes the location of the data in a variable which is declared as __block.

Referenced by drillIntoBlockVariable(), generateByrefCopyHelper(), generateByrefDisposeHelper(), and clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress().

◆ EmitBlockCallExpr()

RValue clang::CodeGen::CodeGenFunction::EmitBlockCallExpr ( const CallExpr E,
ReturnValueSlot  ReturnValue 
)

◆ EmitBlockCopyAndAutorelease()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitBlockCopyAndAutorelease ( llvm::Value *  Block,
QualType  Ty 
)

◆ EmitBlockLiteral()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitBlockLiteral ( const BlockExpr )

Emit block literal.

Returns
an LLVM value which is a pointer to a struct which contains information about the block, including the block invoke function, the captured variables, etc.

◆ EmitBlockWithFallThrough()

void clang::CodeGen::CodeGenFunction::EmitBlockWithFallThrough ( llvm::BasicBlock *  BB,
const Stmt S 
)

◆ emitBoolVecConversion()

llvm::Value * clang::CodeGen::CodeGenFunction::emitBoolVecConversion ( llvm::Value *  SrcVec,
unsigned  NumElementsDst,
const llvm::Twine &  Name = "" 
)

◆ EmitBoundsCheck()

void clang::CodeGen::CodeGenFunction::EmitBoundsCheck ( const Expr E,
const Expr Base,
llvm::Value *  Index,
QualType  IndexType,
bool  Accessed 
)

Emit a check that Base points into an array object, which we can access at index Index.

Accessed should be false if we this expression is used as an lvalue, for instance in "&Arr[Idx]".

Referenced by emitPointerArithmetic().

◆ EmitBoundsCheckImpl()

void clang::CodeGen::CodeGenFunction::EmitBoundsCheckImpl ( const Expr E,
llvm::Value *  Bound,
llvm::Value *  Index,
QualType  IndexType,
QualType  IndexedType,
bool  Accessed 
)

◆ EmitBPFBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

◆ EmitBranch()

void clang::CodeGen::CodeGenFunction::EmitBranch ( llvm::BasicBlock *  Block)

EmitBranch - Emit a branch to the specified basic block from the current insert block, taking care to avoid creation of branches from dummy blocks.

It is legal to call this function even if there is no current insertion point.

This function clears the current insertion point. The caller should follow calls to this function with calls to Emit*Block prior to generation new code.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitOMPSimdRegion(), and clang::CodeGen::CGOpenMPRuntime::emitReduction().

◆ EmitBranchOnBoolExpr()

void clang::CodeGen::CodeGenFunction::EmitBranchOnBoolExpr ( const Expr Cond,
llvm::BasicBlock *  TrueBlock,
llvm::BasicBlock *  FalseBlock,
uint64_t  TrueCount,
Stmt::Likelihood  LH = Stmt::LH_None,
const Expr ConditionalOp = nullptr 
)

EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g.

for an if statement) to the specified blocks. Based on the condition, this might try to simplify the codegen of the conditional based on the branch. TrueCount should be the number of times we expect the condition to evaluate to true based on PGO data.

Referenced by clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), emitPreCond(), and emitSuspendExpression().

◆ EmitBranchThroughCleanup()

void clang::CodeGen::CodeGenFunction::EmitBranchThroughCleanup ( JumpDest  Dest)

◆ EmitBranchToCounterBlock()

void clang::CodeGen::CodeGenFunction::EmitBranchToCounterBlock ( const Expr Cond,
BinaryOperator::Opcode  LOp,
llvm::BasicBlock *  TrueBlock,
llvm::BasicBlock *  FalseBlock,
uint64_t  TrueCount = 0,
Stmt::Likelihood  LH = Stmt::LH_None,
const Expr CntrIdx = nullptr 
)

EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode.

This is used to instrument branch condition coverage for logical operators.

◆ EmitBreakStmt()

void clang::CodeGen::CodeGenFunction::EmitBreakStmt ( const BreakStmt S)

◆ EmitBuiltinAlignTo()

RValue clang::CodeGen::CodeGenFunction::EmitBuiltinAlignTo ( const CallExpr E,
bool  AlignUp 
)

Emit IR for __builtin_align_up/__builtin_align_down.

◆ EmitBuiltinAvailable()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitBuiltinAvailable ( const VersionTuple &  Version)

◆ EmitBuiltinExpr()

RValue clang::CodeGen::CodeGenFunction::EmitBuiltinExpr ( const GlobalDecl  GD,
unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue 
)

◆ EmitBuiltinIsAligned()

RValue clang::CodeGen::CodeGenFunction::EmitBuiltinIsAligned ( const CallExpr E)

Emit IR for __builtin_is_aligned.

◆ EmitBuiltinNewDeleteCall()

RValue clang::CodeGen::CodeGenFunction::EmitBuiltinNewDeleteCall ( const FunctionProtoType Type,
const CallExpr TheCallExpr,
bool  IsDelete 
)

◆ emitBuiltinOSLogFormat()

RValue clang::CodeGen::CodeGenFunction::emitBuiltinOSLogFormat ( const CallExpr E)

Emit IR for __builtin_os_log_format.

◆ emitByrefStructureInit()

void clang::CodeGen::CodeGenFunction::emitByrefStructureInit ( const AutoVarEmission emission)

◆ EmitCall() [1/3]

RValue clang::CodeGen::CodeGenFunction::EmitCall ( const CGFunctionInfo CallInfo,
const CGCallee Callee,
ReturnValueSlot  ReturnValue,
const CallArgList Args,
llvm::CallBase **  callOrInvoke,
bool  IsMustTail,
SourceLocation  Loc,
bool  IsVirtualFunctionPointerThunk = false 
)

EmitCall - Generate a call of the given function, expecting the given result type, and using the given argument list which specifies both the LLVM arguments and the types they were derived from.

Referenced by emitAtomicLibcall(), EmitCall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitLibraryCall(), EmitNewDeleteCall(), emitStructGetterCall(), and emitStructSetterCall().

◆ EmitCall() [2/3]

RValue clang::CodeGen::CodeGenFunction::EmitCall ( const CGFunctionInfo CallInfo,
const CGCallee Callee,
ReturnValueSlot  ReturnValue,
const CallArgList Args,
llvm::CallBase **  callOrInvoke = nullptr,
bool  IsMustTail = false 
)
inline

Definition at line 4386 of file CodeGenFunction.h.

References EmitCall(), and ReturnValue.

◆ EmitCall() [3/3]

RValue clang::CodeGen::CodeGenFunction::EmitCall ( QualType  FnType,
const CGCallee Callee,
const CallExpr E,
ReturnValueSlot  ReturnValue,
llvm::Value *  Chain = nullptr 
)

◆ EmitCallAndReturnForThunk()

void clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk ( llvm::FunctionCallee  Callee,
const ThunkInfo Thunk,
bool  IsUnprototyped 
)

◆ EmitCallArg()

void clang::CodeGen::CodeGenFunction::EmitCallArg ( CallArgList args,
const Expr E,
QualType  ArgType 
)

EmitCallArg - Emit a single call argument.

◆ EmitCallArgs()

void clang::CodeGen::CodeGenFunction::EmitCallArgs ( CallArgList Args,
PrototypeWrapper  Prototype,
llvm::iterator_range< CallExpr::const_arg_iterator ArgRange,
AbstractCallee  AC = AbstractCallee(),
unsigned  ParamsToSkip = 0,
EvaluationOrder  Order = EvaluationOrder::Default 
)

◆ EmitCallee()

CGCallee clang::CodeGen::CodeGenFunction::EmitCallee ( const Expr E)

◆ EmitCallExpr()

RValue clang::CodeGen::CodeGenFunction::EmitCallExpr ( const CallExpr E,
ReturnValueSlot  ReturnValue = ReturnValueSlot() 
)

◆ EmitCallExprLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCallExprLValue ( const CallExpr E)

◆ EmitCallOrInvoke()

llvm::CallBase * clang::CodeGen::CodeGenFunction::EmitCallOrInvoke ( llvm::FunctionCallee  Callee,
ArrayRef< llvm::Value * >  Args,
const Twine &  Name = "" 
)

◆ EmitCapturedLocals()

void clang::CodeGen::CodeGenFunction::EmitCapturedLocals ( CodeGenFunction ParentCGF,
const Stmt OutlinedStmt,
bool  IsFilter 
)

Scan the outlined statement for captures from the parent function.

For each capture, mark the capture as escaped and emit a call to llvm.localrecover. Insert the localrecover result into the LocalDeclMap.

◆ EmitCapturedStmt()

llvm::Function * clang::CodeGen::CodeGenFunction::EmitCapturedStmt ( const CapturedStmt S,
CapturedRegionKind  K 
)

◆ EmitCaseStmt()

void clang::CodeGen::CodeGenFunction::EmitCaseStmt ( const CaseStmt S,
ArrayRef< const Attr * >  Attrs 
)

◆ EmitCaseStmtRange()

void clang::CodeGen::CodeGenFunction::EmitCaseStmtRange ( const CaseStmt S,
ArrayRef< const Attr * >  Attrs 
)

◆ EmitCastLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCastLValue ( const CastExpr E)

◆ EmitCfiCheckFail()

void clang::CodeGen::CodeGenFunction::EmitCfiCheckFail ( )

Emit a cross-DSO CFI failure handling function.

Referenced by clang::CodeGen::CodeGenModule::Release().

◆ EmitCfiCheckStub()

void clang::CodeGen::CodeGenFunction::EmitCfiCheckStub ( )

Emit a stub for the cross-DSO CFI check function.

Referenced by clang::CodeGen::CodeGenModule::Release().

◆ EmitCfiSlowPathCheck()

void clang::CodeGen::CodeGenFunction::EmitCfiSlowPathCheck ( SanitizerMask  Kind,
llvm::Value *  Cond,
llvm::ConstantInt *  TypeId,
llvm::Value *  Ptr,
ArrayRef< llvm::Constant * >  StaticArgs 
)

Emit a slow path cross-DSO CFI check which calls __cfi_slowpath if Cond if false.

◆ EmitCheck()

void clang::CodeGen::CodeGenFunction::EmitCheck ( ArrayRef< std::pair< llvm::Value *, SanitizerMask > >  Checked,
SanitizerHandler  Check,
ArrayRef< llvm::Constant * >  StaticArgs,
ArrayRef< llvm::Value * >  DynamicArgs 
)

Create a basic block that will either trap or call a handler function in the UBSan runtime with the provided arguments, and create a conditional branch to it.

Referenced by EmitOverflowCheckedAbs().

◆ EmitCheckedArgForBuiltin()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCheckedArgForBuiltin ( const Expr E,
BuiltinCheckKind  Kind 
)

Emits an argument for a call to a builtin.

If the builtin sanitizer is enabled, a runtime check specified by Kind is also emitted.

◆ EmitCheckedInBoundsGEP() [1/2]

Address clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP ( Address  Addr,
ArrayRef< llvm::Value * >  IdxList,
llvm::Type *  elementType,
bool  SignedIndices,
bool  IsSubtraction,
SourceLocation  Loc,
CharUnits  Align,
const Twine &  Name = "" 
)

◆ EmitCheckedInBoundsGEP() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP ( llvm::Type *  ElemTy,
llvm::Value *  Ptr,
ArrayRef< llvm::Value * >  IdxList,
bool  SignedIndices,
bool  IsSubtraction,
SourceLocation  Loc,
const Twine &  Name = "" 
)

Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled.

SignedIndices indicates whether any of the GEP indices are signed. IsSubtraction indicates whether the expression used to form the GEP is a subtraction.

Referenced by emitArraySubscriptGEP(), emitPointerArithmetic(), and clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().

◆ EmitCheckedLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCheckedLValue ( const Expr E,
TypeCheckKind  TCK 
)

Same as EmitLValue but additionally we generate checking code to guard against undefined behavior.

This is only suitable when we know that the address will be used to access the object.

◆ EmitCheckSourceLocation()

llvm::Constant * clang::CodeGen::CodeGenFunction::EmitCheckSourceLocation ( SourceLocation  Loc)

Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler.

Referenced by EmitOverflowCheckedAbs().

◆ EmitCheckTypeDescriptor()

llvm::Constant * clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor ( QualType  T)

Emit a description of a type in a format suitable for passing to a runtime sanitizer handler.

Referenced by EmitOverflowCheckedAbs().

◆ EmitCheckValue()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCheckValue ( llvm::Value *  V)

Convert a value into a format suitable for passing to a runtime sanitizer handler.

◆ EmitCMSEClearRecord() [1/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord ( llvm::Value *  V,
llvm::ArrayType *  ATy,
QualType  RTy 
)

◆ EmitCMSEClearRecord() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord ( llvm::Value *  V,
llvm::IntegerType *  ITy,
QualType  RTy 
)

◆ EmitCoawaitExpr()

RValue clang::CodeGen::CodeGenFunction::EmitCoawaitExpr ( const CoawaitExpr E,
AggValueSlot  aggSlot = AggValueSlot::ignored(),
bool  ignoreResult = false 
)

◆ EmitCoawaitLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCoawaitLValue ( const CoawaitExpr E)

◆ EmitCommonNeonBuiltinExpr()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr ( unsigned  BuiltinID,
unsigned  LLVMIntrinsic,
unsigned  AltLLVMIntrinsic,
const char *  NameHint,
unsigned  Modifier,
const CallExpr E,
SmallVectorImpl< llvm::Value * > &  Ops,
Address  PtrOp0,
Address  PtrOp1,
llvm::Triple::ArchType  Arch 
)

◆ EmitComplexAssignmentLValue()

LValue clang::CodeGen::CodeGenFunction::EmitComplexAssignmentLValue ( const BinaryOperator E)

Emit an l-value for an assignment (simple or compound) of complex type.

◆ EmitComplexCompoundAssignmentLValue()

LValue clang::CodeGen::CodeGenFunction::EmitComplexCompoundAssignmentLValue ( const CompoundAssignOperator E)

◆ EmitComplexExpr()

ComplexPairTy clang::CodeGen::CodeGenFunction::EmitComplexExpr ( const Expr E,
bool  IgnoreReal = false,
bool  IgnoreImag = false 
)

EmitComplexExpr - Emit the computation of the specified expression of complex type, returning the result.

◆ EmitComplexExprIntoLValue()

void clang::CodeGen::CodeGenFunction::EmitComplexExprIntoLValue ( const Expr E,
LValue  dest,
bool  isInit 
)

EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.

Referenced by EmitDeclInit(), and StoreAnyExprIntoOneUnit().

◆ EmitComplexPrePostIncDec()

ComplexPairTy clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec ( const UnaryOperator E,
LValue  LV,
bool  isInc,
bool  isPre 
)

◆ EmitComplexToScalarConversion()

llvm::Value * clang::CodeGen::CodeGenFunction::EmitComplexToScalarConversion ( ComplexPairTy  Src,
QualType  SrcTy,
QualType  DstTy,
SourceLocation  Loc 
)

Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type.

Referenced by convertToScalarValue().

◆ EmitCompoundAssignmentLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue ( const CompoundAssignOperator E)

◆ EmitCompoundLiteralLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue ( const CompoundLiteralExpr E)

◆ EmitCompoundStmt()

Address clang::CodeGen::CodeGenFunction::EmitCompoundStmt ( const CompoundStmt S,
bool  GetLast = false,
AggValueSlot  AVS = AggValueSlot::ignored() 
)

◆ EmitCompoundStmtWithoutScope()

Address clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope ( const CompoundStmt S,
bool  GetLast = false,
AggValueSlot  AVS = AggValueSlot::ignored() 
)

◆ EmitConditionalOperatorLValue()

LValue clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue ( const AbstractConditionalOperator E)

◆ EmitConstructorBody()

void clang::CodeGen::CodeGenFunction::EmitConstructorBody ( FunctionArgList Args)

◆ EmitContinueStmt()

void clang::CodeGen::CodeGenFunction::EmitContinueStmt ( const ContinueStmt S)

◆ EmitCoreturnStmt()

void clang::CodeGen::CodeGenFunction::EmitCoreturnStmt ( const CoreturnStmt S)

◆ EmitCoroutineBody()

void clang::CodeGen::CodeGenFunction::EmitCoroutineBody ( const CoroutineBodyStmt S)

◆ EmitCoroutineIntrinsic()

RValue clang::CodeGen::CodeGenFunction::EmitCoroutineIntrinsic ( const CallExpr E,
unsigned int  IID 
)

◆ EmitCoyieldExpr()

RValue clang::CodeGen::CodeGenFunction::EmitCoyieldExpr ( const CoyieldExpr E,
AggValueSlot  aggSlot = AggValueSlot::ignored(),
bool  ignoreResult = false 
)

◆ EmitCoyieldLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCoyieldLValue ( const CoyieldExpr E)

◆ EmitCtorPrologue()

void clang::CodeGen::CodeGenFunction::EmitCtorPrologue ( const CXXConstructorDecl CD,
CXXCtorType  Type,
FunctionArgList Args 
)

◆ EmitCUDAKernelCallExpr()

RValue clang::CodeGen::CodeGenFunction::EmitCUDAKernelCallExpr ( const CUDAKernelCallExpr E,
ReturnValueSlot  ReturnValue 
)

◆ EmitCXXAggrConstructorCall() [1/2]

void clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl D,
const ArrayType ArrayTy,
Address  ArrayPtr,
const CXXConstructExpr E,
bool  NewPointerIsChecked,
bool  ZeroInitialization = false 
)

◆ EmitCXXAggrConstructorCall() [2/2]

void clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl D,
llvm::Value *  NumElements,
Address  ArrayPtr,
const CXXConstructExpr E,
bool  NewPointerIsChecked,
bool  ZeroInitialization = false 
)

◆ EmitCXXBindTemporaryLValue()

LValue clang::CodeGen::CodeGenFunction::EmitCXXBindTemporaryLValue ( const CXXBindTemporaryExpr E)

◆ EmitCXXConstructExpr()