clang  6.0.0svn
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 "/opt/doxygen-docs/src/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h"

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

Classes

class  AbstractCallee
 An abstract representation of regular/ObjC call/message targets. More...
 
class  ArrayInitLoopExprScope
 The scope of an ArrayInitLoopExpr. More...
 
class  AutoVarEmission
 
class  CallLifetimeEnd
 
class  CGCapturedStmtInfo
 API for captured statement code generation. More...
 
class  CGCapturedStmtRAII
 RAII for correct setting/restoring of CapturedStmtInfo. More...
 
struct  CGCoroInfo
 
class  ConditionalEvaluation
 An object to manage conditionally-evaluated expressions. More...
 
class  ConstantEmission
 
class  CXXDefaultInitExprScope
 The scope of a CXXDefaultInitExpr. More...
 
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...
 
class  OMPCancelStackRAII
 Controls insertion of cancellation exit blocks in worksharing constructs. 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...
 
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  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...
 
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  VPtr
 Struct with all informations about dynamic [sub]class needed to set vptr. More...
 

Public Types

enum  CFITypeCheckKind {
  CFITCK_VCall, CFITCK_NVCall, CFITCK_DerivedCast, CFITCK_UnrelatedCast,
  CFITCK_ICall
}
 
enum  TypeCheckKind {
  TCK_Load, TCK_Store, TCK_ReferenceBinding, TCK_MemberAccess,
  TCK_MemberCall, TCK_ConstructorCall, TCK_DowncastPointer, TCK_DowncastReference,
  TCK_Upcast, TCK_UpcastToVirtualBase, TCK_NonnullAssign
}
 Situations in which we might emit a check for the suitability of a pointer or glvalue. More...
 
enum  GuardKind { GuardKind::VariableGuard, GuardKind::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  EvaluationOrder { EvaluationOrder::Default, EvaluationOrder::ForceLeftToRight, EvaluationOrder::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
 
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::Value *, const OMPTaskDataTy &)> TaskGenTy
 

Public Member Functions

void InsertHelper (llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock *BB, llvm::BasicBlock::iterator InsertPt) const
 CGBuilder insert helper. More...
 
bool isCoroutine () const
 
bool hasLabelBeenSeenInCurrentScope () const
 Return true if a label was seen in the current scope. More...
 
llvm::BasicBlock * EmitLandingPad ()
 Emits a landing pad for the current EH stack. More...
 
llvm::BasicBlock * getInvokeDestImpl ()
 
template<class T >
DominatingValue< T >::saved_type saveValueInCond (T value)
 
bool isSEHTryScope () const
 Returns true inside SEH __try blocks. More...
 
bool isCleanupPadScope () const
 Returns true while emitting a cleanuppad. More...
 
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. More...
 
template<class T , class... As>
void pushCleanupAfterFullExpr (CleanupKind Kind, As... A)
 Queue a cleanup to be pushed after finishing the current full-expression. More...
 
void initFullExprCleanup ()
 Set up the last cleaup that was pushed as a conditional full-expression cleanup. More...
 
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. More...
 
void PushDestructorCleanup (const CXXDestructorDecl *Dtor, Address Addr)
 PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address. More...
 
void PopCleanupBlock (bool FallThroughIsBranchThrough=false)
 PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups. More...
 
void DeactivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 DeactivateCleanupBlock - Deactivates the given cleanup block. More...
 
void ActivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 ActivateCleanupBlock - Activates an initially-inactive cleanup. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool isObviouslyBranchWithoutCleanups (JumpDest Dest) const
 isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run. More...
 
void popCatchScope ()
 popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves). More...
 
llvm::BasicBlock * getEHResumeBlock (bool isCleanup)
 
llvm::BasicBlock * getEHDispatchBlock (EHScopeStack::stable_iterator scope)
 
llvm::BasicBlock * getMSVCDispatchBlock (EHScopeStack::stable_iterator scope)
 
bool isInConditionalBranch () const
 isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression. More...
 
void setBeforeOutermostConditional (llvm::Value *value, Address addr)
 
void incrementProfileCounter (const Stmt *S, llvm::Value *StepV=nullptr)
 Increment the profiler's counter for the given statement by StepV. More...
 
uint64_t getProfileCount (const Stmt *S)
 Get the profiler's count for the given statement. More...
 
void setCurrentProfileCount (uint64_t Count)
 Set the profiler's current count. More...
 
uint64_t getCurrentProfileCount ()
 Get the profiler's current count. More...
 
 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. More...
 
Address getEHSelectorSlot ()
 
llvm::ValuegetExceptionFromSlot ()
 Returns the contents of the function's exception object and selector slots. More...
 
llvm::ValuegetSelectorFromSlot ()
 
Address 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)
 pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array. More...
 
void pushRegularPartialArrayCleanup (llvm::Value *arrayBegin, llvm::Value *arrayEnd, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer)
 pushRegularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array. More...
 
void pushDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 pushDestroy - Push the standard destructor for the given type as at least a normal cleanup. More...
 
void pushEHDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup. More...
 
void pushDestroy (CleanupKind kind, 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 emitDestroy (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 emitDestroy - Immediately perform the destruction of the given object. More...
 
llvm::Function * generateDestroyHelper (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray, const VarDecl *VD)
 generateDestroyHelper - Generates a helper function which, when invoked, destroys the given object. More...
 
void emitArrayDestroy (llvm::Value *begin, llvm::Value *end, QualType elementType, CharUnits elementAlign, Destroyer *destroyer, bool checkZeroLength, bool useEHCleanup)
 emitArrayDestroy - Destroys all the elements of the given array, beginning from last to first. More...
 
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. More...
 
CleanupKind getCleanupKind (QualType::DestructionKind kind)
 
void GenerateObjCMethod (const ObjCMethodDecl *OMD)
 Generate an Objective-C method. More...
 
void StartObjCMethod (const ObjCMethodDecl *MD, const ObjCContainerDecl *CD)
 StartObjCMethod - Begin emission of an ObjCMethod. More...
 
void GenerateObjCGetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID)
 GenerateObjCGetter - Synthesize an Objective-C property getter function. More...
 
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. More...
 
void generateObjCSetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, llvm::Constant *AtomicHelperFn)
 
llvm::ValueEmitBlockLiteral (const BlockExpr *, llvm::Function **InvokeF=nullptr)
 Emit block literal. More...
 
llvm::Function * GenerateBlockFunction (GlobalDecl GD, const CGBlockInfo &Info, const DeclMapTy &ldm, bool IsLambdaConversionToBlock, bool BuildGlobalBlock)
 
llvm::Constant * GenerateCopyHelperFunction (const CGBlockInfo &blockInfo)
 Generate the copy-helper function for a block closure object: static void block_copy_helper(block_t *dst, block_t *src); The runtime will have previously initialized 'dst' by doing a bit-copy of 'src'. More...
 
llvm::Constant * GenerateDestroyHelperFunction (const CGBlockInfo &blockInfo)
 Generate the destroy-helper function for a block closure object: static void block_destroy_helper(block_t *theBlock);. More...
 
llvm::Constant * GenerateObjCAtomicSetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
 GenerateObjCAtomicSetterCopyHelperFunction - Given a c++ object type with non-trivial copy assignment function, produce following helper function. More...
 
llvm::Constant * GenerateObjCAtomicGetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
 
llvm::ValueEmitBlockCopyAndAutorelease (llvm::Value *Block, QualType Ty)
 
void BuildBlockRelease (llvm::Value *DeclPtr, BlockFieldFlags flags)
 
void emitByrefStructureInit (const AutoVarEmission &emission)
 Initialize the structural components of a __block variable, i.e. More...
 
void enterByrefCleanup (const AutoVarEmission &emission)
 Enter a cleanup to destroy a __block variable. More...
 
void setBlockContextParameter (const ImplicitParamDecl *D, unsigned argNum, llvm::Value *ptr)
 
Address LoadBlockStruct ()
 
Address GetAddrOfBlockDecl (const VarDecl *var, bool ByRef)
 
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. More...
 
Address emitBlockByrefAddress (Address baseAddr, const BlockByrefInfo &info, bool followForward, const llvm::Twine &name)
 
const BlockByrefInfogetBlockByrefInfo (const VarDecl *var)
 BuildByrefInfo - This routine changes a __block variable declared as T x into: More...
 
QualType BuildFunctionArgList (GlobalDecl GD, FunctionArgList &Args)
 
void GenerateCode (GlobalDecl GD, llvm::Function *Fn, const CGFunctionInfo &FnInfo)
 
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. More...
 
void EmitConstructorBody (FunctionArgList &Args)
 EmitConstructorBody - Emits the body of the current constructor. More...
 
void EmitDestructorBody (FunctionArgList &Args)
 EmitDestructorBody - Emits the body of the current destructor. More...
 
void emitImplicitAssignmentOperatorBody (FunctionArgList &Args)
 
void EmitFunctionBody (FunctionArgList &Args, const Stmt *Body)
 
void EmitBlockWithFallThrough (llvm::BasicBlock *BB, const Stmt *S)
 When instrumenting to collect profile data, the counts for some blocks such as switch cases need to not include the fall-through counts, so emit a branch around the instrumentation code. More...
 
void EmitForwardingCallToLambda (const CXXMethodDecl *LambdaCallOperator, CallArgList &CallArgs)
 
void EmitLambdaBlockInvokeBody ()
 
void EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD)
 
void EmitLambdaStaticInvokeBody (const CXXMethodDecl *MD)
 
void EmitAsanPrologueOrEpilogue (bool Prologue)
 
llvm::DebugLoc EmitReturnBlock ()
 Emit the unified return block, trying to avoid its emission when possible. More...
 
void FinishFunction (SourceLocation EndLoc=SourceLocation())
 FinishFunction - Complete IR generation of the current function. More...
 
void StartThunk (llvm::Function *Fn, GlobalDecl GD, const CGFunctionInfo &FnInfo)
 
void EmitCallAndReturnForThunk (llvm::Constant *Callee, const ThunkInfo *Thunk)
 
void FinishThunk ()
 
void EmitMustTailThunk (const CXXMethodDecl *MD, llvm::Value *AdjustedThisPtr, llvm::Value *Callee)
 Emit a musttail call for a thunk with a potentially adjusted this pointer. More...
 
void generateThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk)
 Generate a thunk for the given method. More...
 
llvm::Function * GenerateVarArgsThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk)
 
void EmitCtorPrologue (const CXXConstructorDecl *CD, CXXCtorType Type, FunctionArgList &Args)
 EmitCtorPrologue - This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor. More...
 
void EmitInitializerForField (FieldDecl *Field, LValue LHS, Expr *Init)
 
void InitializeVTablePointer (const VPtr &vptr)
 Initialize the vtable pointer of the given subobject. More...
 
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::ValueGetVTablePtr (Address This, llvm::Type *VTableTy, const CXXRecordDecl *VTableClass)
 GetVTablePtr - Return the Value of the vtable pointer member pointed to by This. More...
 
void EmitVTablePtrCheckForCast (QualType T, llvm::Value *Derived, bool MayBeNull, CFITypeCheckKind TCK, SourceLocation Loc)
 Derived is the presumed address of an object of type T after a cast. More...
 
void EmitVTablePtrCheckForCall (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc)
 EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable. More...
 
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. More...
 
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. More...
 
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. More...
 
llvm::ValueEmitVTableTypeCheckedLoad (const CXXRecordDecl *RD, llvm::Value *VTable, uint64_t VTableByteOffset)
 Emit a type checked load from the given vtable. More...
 
void EnterDtorCleanups (const CXXDestructorDecl *Dtor, CXXDtorType Type)
 EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor. More...
 
bool ShouldInstrumentFunction ()
 ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls. More...
 
bool ShouldXRayInstrumentFunction () const
 ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds. More...
 
bool AlwaysEmitXRayCustomEvents () const
 AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls. More...
 
llvm::Constant * EncodeAddrForUseInPrologue (llvm::Function *F, llvm::Constant *Addr)
 Encode an address into a form suitable for use in a function prologue. More...
 
llvm::ValueDecodeAddrUsedInPrologue (llvm::Value *F, llvm::Value *EncodedAddr)
 Decode an address used in a function prologue, encoded by EncodeAddrForUseInPrologue. More...
 
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. More...
 
void EmitFunctionEpilog (const CGFunctionInfo &FI, bool EmitRetDbgLoc, SourceLocation EndLoc)
 EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary. More...
 
void EmitReturnValueCheck (llvm::Value *RV)
 Emit a test that checks if the return value RV is nonnull. More...
 
void EmitStartEHSpec (const Decl *D)
 EmitStartEHSpec - Emit the start of the exception spec. More...
 
void EmitEndEHSpec (const Decl *D)
 EmitEndEHSpec - Emit the end of the exception spec. More...
 
llvm::BasicBlock * getTerminateLandingPad ()
 getTerminateLandingPad - Return a landing pad that just calls terminate. More...
 
llvm::BasicBlock * getTerminateHandler ()
 getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate. More...
 
llvm::TypeConvertTypeForMem (QualType T)
 
llvm::TypeConvertType (QualType T)
 
llvm::TypeConvertType (const TypeDecl *T)
 
llvm::ValueLoadObjCSelf ()
 LoadObjCSelf - Load the value of self. More...
 
QualType TypeOfSelfObject ()
 TypeOfSelfObject - Return type of object that this self represents. More...
 
llvm::BasicBlock * createBasicBlock (const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr)
 createBasicBlock - Create an LLVM basic block. More...
 
JumpDest getJumpDestForLabel (const LabelDecl *S)
 getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to. More...
 
void SimplifyForwardingBlocks (llvm::BasicBlock *BB)
 SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it. More...
 
void EmitBlock (llvm::BasicBlock *BB, bool IsFinished=false)
 EmitBlock - Emit the given block. More...
 
void EmitBlockAfterUses (llvm::BasicBlock *BB)
 EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it. More...
 
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. More...
 
bool HaveInsertPoint () const
 HaveInsertPoint - True if an insertion point is defined. More...
 
void EnsureInsertPoint ()
 EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go. More...
 
void ErrorUnsupported (const Stmt *S, const char *Type)
 ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet. More...
 
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 MakeAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo)
 
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. More...
 
LValue MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T)
 
CharUnits getNaturalTypeAlignment (QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, bool forPointeeType=false)
 
CharUnits getNaturalPointeeTypeAlignment (QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 
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)
 
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. More...
 
Address CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, bool CastToDefaultAddrSpace=true)
 CreateTempAlloca - This creates a alloca and inserts it into the entry block. More...
 
Address CreateDefaultAlignTempAlloca (llvm::Type *Ty, const Twine &Name="tmp")
 CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type. More...
 
void InitTempAlloca (Address Alloca, llvm::Value *Value)
 InitTempAlloca - Provide an initial value for the given alloca which will be observable at all locations in the function. More...
 
Address CreateIRTemp (QualType T, const Twine &Name="tmp")
 CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment. More...
 
Address CreateMemTemp (QualType T, const Twine &Name="tmp", bool CastToDefaultAddrSpace=true)
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignment. More...
 
Address CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp", bool CastToDefaultAddrSpace=true)
 
AggValueSlot CreateAggTemp (QualType T, const Twine &Name="tmp")
 CreateAggTemp - Create a temporary memory object for the given aggregate type. More...
 
llvm::ValueEmitCastToVoidPtr (llvm::Value *value)
 Emit a cast to void* in the appropriate address space. More...
 
llvm::ValueEvaluateExprAsBool (const Expr *E)
 EvaluateExprAsBool - Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value. More...
 
void EmitIgnoredExpr (const Expr *E)
 EmitIgnoredExpr - Emit an expression in a context which ignores the result. More...
 
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. More...
 
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. More...
 
RValue EmitAnyExprToTemp (const Expr *E)
 EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided. More...
 
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. More...
 
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. More...
 
bool hasVolatileMember (QualType T)
 hasVolatileMember - returns true if aggregate type has a volatile member. More...
 
void EmitAggregateAssign (Address DestPtr, Address SrcPtr, QualType EltTy)
 EmitAggregateCopy - Emit an aggregate assignment. More...
 
void EmitAggregateCopyCtor (Address DestPtr, Address SrcPtr, QualType DestTy, QualType SrcTy)
 
void EmitAggregateCopy (Address DestPtr, Address SrcPtr, QualType EltTy, bool isVolatile=false, bool isAssignment=false)
 EmitAggregateCopy - Emit an aggregate copy. More...
 
Address GetAddrOfLocalVar (const VarDecl *VD)
 GetAddrOfLocalVar - Return the address of a local variable. More...
 
const LValuegetOpaqueLValueMapping (const OpaqueValueExpr *e)
 getOpaqueLValueMapping - Given an opaque value expression (which must be mapped to an l-value), return its mapping. More...
 
const RValuegetOpaqueRValueMapping (const OpaqueValueExpr *e)
 getOpaqueRValueMapping - Given an opaque value expression (which must be mapped to an r-value), return its mapping. More...
 
llvm::ValuegetArrayInitIndex ()
 Get the index of the current ArrayInitLoopExpr, if any. More...
 
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. More...
 
llvm::ValueEmitVAStartEnd (llvm::Value *ArgValue, bool IsStart)
 Emits a call to an LLVM variable-argument intrinsic, either llvm.va_start or llvm.va_end. More...
 
Address EmitVAArg (VAArgExpr *VE, Address &VAListAddr)
 Generate code to get an argument from the passed in pointer and update it accordingly. More...
 
llvm::ValueemitArrayLength (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. More...
 
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. More...
 
std::pair< llvm::Value *, QualTypegetVLASize (const VariableArrayType *vla)
 getVLASize - 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. More...
 
std::pair< llvm::Value *, QualTypegetVLASize (QualType vla)
 
llvm::ValueLoadCXXThis ()
 LoadCXXThis - Load the value of 'this'. More...
 
Address LoadCXXThisAddress ()
 
llvm::ValueLoadCXXVTT ()
 LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases. More...
 
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. More...
 
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. More...
 
Address GetAddressOfDerivedClass (Address Value, const CXXRecordDecl *Derived, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd, bool NullCheckValue)
 
llvm::ValueGetVTTParameter (GlobalDecl GD, bool ForVirtualBase, bool Delegating)
 GetVTTParameter - Return the VTT parameter that should be passed to a base constructor/destructor with virtual bases. More...
 
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. More...
 
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). More...
 
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, const CXXConstructExpr *E)
 
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, CallArgList &Args)
 
void EmitVTableAssumptionLoads (const CXXRecordDecl *ClassDecl, Address This)
 Emit assumption load for all bases. More...
 
void EmitVTableAssumptionLoad (const VPtr &vptr, Address This)
 Emit assumption that vptr load == global vtable. More...
 
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 ZeroInitialization=false)
 EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array. More...
 
void EmitCXXAggrConstructorCall (const CXXConstructorDecl *D, llvm::Value *NumElements, Address ArrayPtr, const CXXConstructExpr *E, bool ZeroInitialization=false)
 EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array. More...
 
void EmitCXXDestructorCall (const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating, Address This)
 
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)
 Emits all the code to cause the given temporary to be cleaned up. More...
 
llvm::ValueEmitLifetimeStart (uint64_t Size, llvm::Value *Addr)
 Emit a lifetime.begin marker if some criteria are satisfied. More...
 
void EmitLifetimeEnd (llvm::Value *Size, llvm::Value *Addr)
 
llvm::ValueEmitCXXNewExpr (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 Expr *Arg, bool IsDelete)
 
llvm::ValueEmitCXXTypeidExpr (const CXXTypeidExpr *E)
 
llvm::ValueEmitDynamicCast (Address V, const CXXDynamicCastExpr *DCE)
 
Address EmitCXXUuidofExpr (const CXXUuidofExpr *E)
 
bool sanitizePerformTypeCheck () const
 Whether any type-checking sanitizers are enabled. More...
 
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet())
 Emit a check that V is the address of storage of the appropriate size and alignment for an object of type Type. More...
 
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. More...
 
llvm::ValueEmitScalarPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
 
ComplexPairTy EmitComplexPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
 
void EmitAlignmentAssumption (llvm::Value *PtrValue, unsigned Alignment, llvm::Value *OffsetValue=nullptr)
 
llvm::DebugLoc SourceLocToDebugLoc (SourceLocation Location)
 Converts Location to a DebugLoc, if debug information is enabled. More...
 
void EmitDecl (const Decl &D)
 EmitDecl - Emit a declaration. More...
 
void EmitVarDecl (const VarDecl &D)
 EmitVarDecl - Emit a local variable declaration. More...
 
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. More...
 
void EmitAutoVarDecl (const VarDecl &D)
 EmitAutoVarDecl - Emit an auto variable declaration. More...
 
AutoVarEmission EmitAutoVarAlloca (const VarDecl &var)
 EmitAutoVarAlloca - Emit the alloca and debug information for a local variable. More...
 
void EmitAutoVarInit (const AutoVarEmission &emission)
 
void EmitAutoVarCleanups (const AutoVarEmission &emission)
 
void emitAutoVarTypeCleanup (const AutoVarEmission &emission, QualType::DestructionKind dtorKind)
 Enter a destroy cleanup for the given local variable. More...
 
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. More...
 
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. More...
 
void unprotectFromPeepholes (PeepholeProtection protection)
 
void EmitAlignmentAssumption (llvm::Value *PtrValue, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr)
 
void EmitStopPoint (const Stmt *S)
 EmitStopPoint - Emit a debug stoppoint if we are emitting debug info. More...
 
void EmitStmt (const Stmt *S, ArrayRef< const Attr *> Attrs=None)
 EmitStmt - Emit the code for the statement. More...
 
bool EmitSimpleStmt (const Stmt *S)
 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. More...
 
Address EmitCompoundStmt (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored())
 EmitCompoundStmt - Emit a compound statement {..} node. More...
 
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. More...
 
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=None)
 
void EmitDoStmt (const DoStmt &S, ArrayRef< const Attr *> Attrs=None)
 
void EmitForStmt (const ForStmt &S, ArrayRef< const Attr *> Attrs=None)
 
void EmitReturnStmt (const ReturnStmt &S)
 EmitReturnStmt - Note that due to GCC extensions, this can have an operand if the function returns void, or may be missing one if the function returns non-void. More...
 
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)
 
void EmitCaseStmt (const CaseStmt &S)
 
void EmitCaseStmtRange (const CaseStmt &S)
 EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range. More...
 
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 startOutlinedSEHHelper (CodeGenFunction &ParentCGF, bool IsFilter, const Stmt *OutlinedStmt)
 Arrange a function prototype that can be called by Windows exception handling personalities. More...
 
llvm::Function * GenerateSEHFilterFunction (CodeGenFunction &ParentCGF, const SEHExceptStmt &Except)
 Create a stub filter function that will ultimately hold the code of the filter expression. More...
 
llvm::Function * GenerateSEHFinallyFunction (CodeGenFunction &ParentCGF, const SEHFinallyStmt &Finally)
 
void EmitSEHExceptionCodeSave (CodeGenFunction &ParentCGF, llvm::Value *ParentFP, llvm::Value *EntryEBP)
 
llvm::ValueEmitSEHExceptionCode ()
 
llvm::ValueEmitSEHExceptionInfo ()
 
llvm::ValueEmitSEHAbnormalTermination ()
 
void EmitCapturedLocals (CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt, bool IsFilter)
 Scan the outlined statement for captures from the parent function. More...
 
Address recoverAddrOfEscapedLocal (CodeGenFunction &ParentCGF, Address ParentVar, llvm::Value *ParentFP)
 Recovers the address of a local in a parent function. More...
 
void EmitCXXForRangeStmt (const CXXForRangeStmt &S, ArrayRef< const Attr *> Attrs=None)
 
llvm::ValuegetTypeSize (QualType Ty)
 Returns calculated size of the specified type. More...
 
LValue InitCapturedStruct (const CapturedStmt &S)
 
llvm::Function * EmitCapturedStmt (const CapturedStmt &S, CapturedRegionKind K)
 Generate an outlined function for the body of a CapturedStmt, store any captured variables into the captured struct, and call the outlined function. More...
 
llvm::Function * GenerateCapturedStmtFunction (const CapturedStmt &S)
 Creates the outlined function for a CapturedStmt. More...
 
Address GenerateCapturedStmtArgument (const CapturedStmt &S)
 
llvm::Function * GenerateOpenMPCapturedStmtFunction (const CapturedStmt &S)
 
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. More...
 
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. More...
 
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. More...
 
bool EmitOMPFirstprivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 
void EmitOMPPrivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 
void EmitOMPUseDevicePtrClause (const OMPClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, Address > &CaptureDeviceAddrMap)
 
bool EmitOMPCopyinClause (const OMPExecutableDirective &D)
 Emit code for copyin clause in D directive. More...
 
bool EmitOMPLastprivateClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 Emit initial code for lastprivate variables. More...
 
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. More...
 
void EmitOMPLinearClause (const OMPLoopDirective &D, CodeGenFunction::OMPPrivateScope &PrivateScope)
 Emit initial code for linear clauses. More...
 
void EmitOMPLinearClauseFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> &CondGen)
 Emit final code for linear clauses. More...
 
void EmitOMPReductionClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 Emit initial code for reduction variables. More...
 
void EmitOMPReductionClauseFinal (const OMPExecutableDirective &D, const OpenMPDirectiveKind ReductionKind)
 Emit final update of reduction values to original variables at the end of the directive. More...
 
bool EmitOMPLinearClauseInit (const OMPLoopDirective &D)
 Emit initial code for linear variables. More...
 
void EmitOMPTaskBasedDirective (const OMPExecutableDirective &S, const RegionCodeGenTy &BodyGen, const TaskGenTy &TaskGen, OMPTaskDataTy &Data)
 
void EmitOMPParallelDirective (const OMPParallelDirective &S)
 
void EmitOMPSimdDirective (const OMPSimdDirective &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 EmitOMPCriticalDirective (const OMPCriticalDirective &S)
 
void EmitOMPParallelForDirective (const OMPParallelForDirective &S)
 
void EmitOMPParallelForSimdDirective (const OMPParallelForSimdDirective &S)
 
void EmitOMPParallelSectionsDirective (const OMPParallelSectionsDirective &S)
 
void EmitOMPTaskDirective (const OMPTaskDirective &S)
 
void EmitOMPTaskyieldDirective (const OMPTaskyieldDirective &S)
 
void EmitOMPBarrierDirective (const OMPBarrierDirective &S)
 
void EmitOMPTaskwaitDirective (const OMPTaskwaitDirective &S)
 
void EmitOMPTaskgroupDirective (const OMPTaskgroupDirective &S)
 
void EmitOMPFlushDirective (const OMPFlushDirective &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 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 EmitOMPInnerLoop (const Stmt &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. More...
 
JumpDest getOMPCancelDestination (OpenMPDirectiveKind Kind)
 
void EmitOMPPrivateLoopCounters (const OMPLoopDirective &S, OMPPrivateScope &LoopScope)
 Emit initial code for loop counters of loop-based directives. More...
 
void EmitOMPLoopBody (const OMPLoopDirective &D, JumpDest LoopExit)
 Helper for the OpenMP loop directives. More...
 
bool EmitOMPWorksharingLoop (const OMPLoopDirective &S, Expr *EUB, const CodeGenLoopBoundsTy &CodeGenLoopBounds, const CodeGenDispatchBoundsTy &CGDispatchBounds)
 Emit code for the worksharing loop-based directive. More...
 
void EmitOMPDistributeLoop (const OMPLoopDirective &S, const CodeGenLoopTy &CodeGenLoop, Expr *IncExpr)
 Emit code for the distribute loop-based directive. More...
 
void EmitOMPSimdInit (const OMPLoopDirective &D, bool IsMonotonic=false)
 Helpers for the OpenMP loop directives. More...
 
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. More...
 
RValue GetUndefRValue (QualType Ty)
 GetUndefRValue - Get an appropriate 'undef' rvalue for the given type. More...
 
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). More...
 
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). More...
 
LValue EmitLValue (const Expr *E)
 EmitLValue - Emit code to compute a designator that specifies the location of the expression. More...
 
LValue EmitCheckedLValue (const Expr *E, TypeCheckKind TCK)
 Same as EmitLValue but additionally we generate checking code to guard against undefined behavior. More...
 
RValue convertTempToRValue (Address addr, QualType type, SourceLocation Loc)
 Given the address of a temporary variable, produce an r-value of its type. More...
 
void EmitAtomicInit (Expr *E, LValue lvalue)
 
bool LValueIsSuitableForInlineAtomic (LValue Src)
 An LValue is a candidate for having its loads and stores be made atomic if we are operating under /volatile:ms and the LValue itself is volatile and performing such an operation can be performed without a libcall. More...
 
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())
 Emit a load from an l-value of atomic type. More...
 
void EmitAtomicStore (RValue rvalue, LValue lvalue, bool isInit)
 
void EmitAtomicStore (RValue rvalue, LValue lvalue, llvm::AtomicOrdering AO, bool IsVolatile, bool isInit)
 Emit a store to an l-value of atomic type. More...
 
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())
 Emit a compare-and-exchange op for atomic type. More...
 
void EmitAtomicUpdate (LValue LVal, llvm::AtomicOrdering AO, const llvm::function_ref< RValue(RValue)> &UpdateOp, bool IsVolatile)
 
llvm::ValueEmitToMemory (llvm::Value *Value, QualType Ty)
 EmitToMemory - Change a scalar value from its value representation to its in-memory representation. More...
 
llvm::ValueEmitFromMemory (llvm::Value *Value, QualType Ty)
 EmitFromMemory - Change a scalar value from its memory representation to its value representation. More...
 
bool EmitScalarRangeCheck (llvm::Value *Value, QualType Ty, SourceLocation Loc)
 Check if the scalar Value is within the valid range for the given type Ty. More...
 
llvm::ValueEmitLoadOfScalar (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. More...
 
llvm::ValueEmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo, bool isNontemporal=false)
 
llvm::ValueEmitLoadOfScalar (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. More...
 
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. More...
 
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. More...
 
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. More...
 
RValue EmitLoadOfExtVectorElementLValue (LValue V)
 
RValue EmitLoadOfBitfieldLValue (LValue LV, SourceLocation Loc)
 
RValue EmitLoadOfGlobalRegLValue (LValue LV)
 Load of global gamed gegisters are always calls to intrinsics. More...
 
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'. More...
 
void EmitStoreThroughExtVectorComponentLValue (RValue Src, LValue Dst)
 
void EmitStoreThroughGlobalRegLValue (RValue Src, LValue Dst)
 Store of global named registers are always calls to intrinsics. More...
 
void EmitStoreThroughBitfieldLValue (RValue Src, LValue Dst, llvm::Value **Result=nullptr)
 EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue. More...
 
LValue EmitComplexAssignmentLValue (const BinaryOperator *E)
 Emit an l-value for an assignment (simple or compound) of complex type. More...
 
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 EmitOMPArraySectionExpr (const OMPArraySectionExpr *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)
 
LValue EmitConditionalOperatorLValue (const AbstractConditionalOperator *E)
 
LValue EmitCastLValue (const CastExpr *E)
 EmitCastLValue - Casts are never lvalues unless that cast is to a reference type. More...
 
LValue EmitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *E)
 
LValue EmitOpaqueValueLValue (const OpaqueValueExpr *e)
 
Address EmitExtVectorElementLValue (LValue V)
 Generates lvalue for partial ext_vector access. More...
 
RValue EmitRValueForField (LValue LV, const FieldDecl *FD, SourceLocation Loc)
 
Address EmitArrayToPointerDecay (const Expr *Array, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 
ConstantEmission tryEmitAsConstant (DeclRefExpr *refExpr)
 Try to emit a reference to the given value without producing it as an l-value. More...
 
ConstantEmission tryEmitAsConstant (const MemberExpr *ME)
 
RValue EmitPseudoObjectRValue (const PseudoObjectExpr *e, AggValueSlot slot=AggValueSlot::ignored())
 
LValue EmitPseudoObjectLValue (const PseudoObjectExpr *e)
 
llvm::ValueEmitIvarOffset (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar)
 
LValue EmitLValueForField (LValue Base, const FieldDecl *Field)
 
LValue EmitLValueForLambdaField (const FieldDecl *Field)
 Given that we are currently emitting a lambda, emit an l-value for one of its members. More...
 
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. More...
 
LValue EmitLValueForIvar (QualType ObjectTy, llvm::Value *Base, const ObjCIvarDecl *Ivar, unsigned CVRQualifiers)
 
LValue EmitCXXConstructLValue (const CXXConstructExpr *E)
 
LValue EmitCXXBindTemporaryLValue (const CXXBindTemporaryExpr *E)
 
LValue EmitLambdaLValue (const LambdaExpr *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::Instruction **callOrInvoke=nullptr)
 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. More...
 
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)
 Emit a CallExpr without considering whether it might be a subclass. More...
 
CGCallee EmitCallee (const Expr *E)
 
void checkTargetFeatures (const CallExpr *E, const FunctionDecl *TargetDecl)
 
llvm::CallInst * EmitRuntimeCall (llvm::Value *callee, const Twine &name="")
 
llvm::CallInst * EmitRuntimeCall (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="")
 
llvm::CallInst * EmitNounwindRuntimeCall (llvm::Value *callee, const Twine &name="")
 
llvm::CallInst * EmitNounwindRuntimeCall (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="")
 
llvm::CallSite EmitCallOrInvoke (llvm::Value *Callee, ArrayRef< llvm::Value *> Args, const Twine &Name="")
 Emits a call or invoke instruction to the given function, depending on the current state of the EH stack. More...
 
llvm::CallSite EmitRuntimeCallOrInvoke (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="")
 Emits a call or invoke instruction to the given runtime function. More...
 
llvm::CallSite EmitRuntimeCallOrInvoke (llvm::Value *callee, const Twine &name="")
 Emits a call or invoke instruction to the given nullary runtime function. More...
 
void EmitNoreturnRuntimeCallOrInvoke (llvm::Value *callee, ArrayRef< llvm::Value *> args)
 Emits a call or invoke to the given noreturn runtime function. More...
 
CGCallee BuildAppleKextVirtualCall (const CXXMethodDecl *MD, NestedNameSpecifier *Qual, llvm::Type *Ty)
 BuildAppleKextVirtualCall - This routine is to support gcc's kext ABI making indirect call to virtual functions. More...
 
CGCallee BuildAppleKextVirtualDestructorCall (const CXXDestructorDecl *DD, CXXDtorType Type, const CXXRecordDecl *RD)
 BuildVirtualCall - This routine makes indirect vtable call for call to virtual destructors. More...
 
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 (const CXXDestructorDecl *DD, const CGCallee &Callee, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E, StructorType Type)
 
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)
 Emit the address of a field using a member data pointer. More...
 
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, ReturnValueSlot ReturnValue)
 
RValue EmitBuiltinExpr (const FunctionDecl *FD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 
RValue emitBuiltinOSLogFormat (const CallExpr &E)
 Emit IR for __builtin_os_log_format. More...
 
llvm::Function * generateBuiltinOSLogHelperFunction (const analyze_os_log::OSLogBufferLayout &Layout, CharUnits BufferAlignment)
 
RValue EmitBlockCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue)
 
llvm::ValueEmitTargetBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 EmitTargetBuiltinExpr - Emit the given builtin call. More...
 
llvm::ValueEmitAArch64CompareBuiltinExpr (llvm::Value *Op, llvm::Type *Ty, const llvm::CmpInst::Predicate Fp, const llvm::CmpInst::Predicate Ip, const llvm::Twine &Name="")
 
llvm::ValueEmitARMBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitCommonNeonBuiltinExpr (unsigned BuiltinID, unsigned LLVMIntrinsic, unsigned AltLLVMIntrinsic, const char *NameHint, unsigned Modifier, const CallExpr *E, SmallVectorImpl< llvm::Value *> &Ops, Address PtrOp0, Address PtrOp1)
 
llvm::Function * LookupNeonLLVMIntrinsic (unsigned IntrinsicID, unsigned Modifier, llvm::Type *ArgTy, const CallExpr *E)
 
llvm::ValueEmitNeonCall (llvm::Function *F, SmallVectorImpl< llvm::Value *> &O, const char *name, unsigned shift=0, bool rightshift=false)
 
llvm::ValueEmitNeonSplat (llvm::Value *V, llvm::Constant *Idx)
 
llvm::ValueEmitNeonShiftVector (llvm::Value *V, llvm::Type *Ty, bool negateForRightShift)
 
llvm::ValueEmitNeonRShiftImm (llvm::Value *Vec, llvm::Value *Amt, llvm::Type *Ty, bool usgn, const char *name)
 
llvm::ValuevectorWrapScalar16 (llvm::Value *Op)
 
llvm::ValueEmitAArch64BuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueBuildVector (ArrayRef< llvm::Value *> Ops)
 
llvm::ValueEmitX86BuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitPPCBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitAMDGPUBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitSystemZBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitNVPTXBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitWebAssemblyBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitHexagonBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
 
llvm::ValueEmitMSVCBuiltinExpr (MSVCIntrin BuiltinID, const CallExpr *E)
 
llvm::ValueEmitBuiltinAvailable (ArrayRef< llvm::Value *> Args)
 
llvm::ValueEmitObjCProtocolExpr (const ObjCProtocolExpr *E)
 
llvm::ValueEmitObjCStringLiteral (const ObjCStringLiteral *E)
 Emits an instance of NSConstantString representing the object. More...
 
llvm::ValueEmitObjCBoxedExpr (const ObjCBoxedExpr *E)
 EmitObjCBoxedExpr - This routine generates code to call the appropriate expression boxing method. More...
 
llvm::ValueEmitObjCArrayLiteral (const ObjCArrayLiteral *E)
 
llvm::ValueEmitObjCDictionaryLiteral (const ObjCDictionaryLiteral *E)
 
llvm::ValueEmitObjCCollectionLiteral (const Expr *E, const ObjCMethodDecl *MethodWithObjects)
 
llvm::ValueEmitObjCSelectorExpr (const ObjCSelectorExpr *E)
 Emit a selector. More...
 
RValue EmitObjCMessageExpr (const ObjCMessageExpr *E, ReturnValueSlot Return=ReturnValueSlot())
 
CleanupKind getARCCleanupKind ()
 Retrieves the default cleanup kind for an ARC cleanup. More...
 
void EmitARCInitWeak (Address addr, llvm::Value *value)
 i8* @objc_initWeak(i8** addr, i8* value) Returns value. More...
 
void EmitARCDestroyWeak (Address addr)
 void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil). More...
 
llvm::ValueEmitARCLoadWeak (Address addr)
 i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)). More...
 
llvm::ValueEmitARCLoadWeakRetained (Address addr)
 i8* @objc_loadWeakRetained(i8** addr) More...
 
llvm::ValueEmitARCStoreWeak (Address addr, llvm::Value *value, bool ignored)
 i8* @objc_storeWeak(i8** addr, i8* value) Returns value. More...
 
void EmitARCCopyWeak (Address dst, Address src)
 void @objc_copyWeak(i8** dest, i8** src) Disregards the current value in dest. More...
 
void EmitARCMoveWeak (Address dst, Address src)
 void @objc_moveWeak(i8** dest, i8** src) Disregards the current value in dest. More...
 
llvm::ValueEmitARCRetainAutorelease (QualType type, llvm::Value *value)
 Do a fused retain/autorelease of the given object. More...
 
llvm::ValueEmitARCRetainAutoreleaseNonBlock (llvm::Value *value)
 Do a fused retain/autorelease of the given object. More...
 
llvm::ValueEmitARCStoreStrong (LValue lvalue, llvm::Value *value, bool resultIgnored)
 Store into a strong object. More...
 
llvm::ValueEmitARCStoreStrongCall (Address addr, llvm::Value *value, bool resultIgnored)
 Store into a strong object. More...
 
llvm::ValueEmitARCRetain (QualType type, llvm::Value *value)
 Produce the code to do a retain. More...
 
llvm::ValueEmitARCRetainNonBlock (llvm::Value *value)
 Retain the given object, with normal retain semantics. More...
 
llvm::ValueEmitARCRetainBlock (llvm::Value *value, bool mandatory)
 Retain the given block, with _Block_copy semantics. More...
 
void EmitARCDestroyStrong (Address addr, ARCPreciseLifetime_t precise)
 Destroy a __strong variable. More...
 
void EmitARCRelease (llvm::Value *value, ARCPreciseLifetime_t precise)
 Release the given object. More...
 
llvm::ValueEmitARCAutorelease (llvm::Value *value)
 Autorelease the given object. More...
 
llvm::ValueEmitARCAutoreleaseReturnValue (llvm::Value *value)
 Autorelease the given object. More...
 
llvm::ValueEmitARCRetainAutoreleaseReturnValue (llvm::Value *value)
 Do a fused retain/autorelease of the given object. More...
 
llvm::ValueEmitARCRetainAutoreleasedReturnValue (llvm::Value *value)
 Retain the given object which is the result of a function call. More...
 
llvm::ValueEmitARCUnsafeClaimAutoreleasedReturnValue (llvm::Value *value)
 Claim a possibly-autoreleased return value at +0. More...
 
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::ValueEmitObjCThrowOperand (const Expr *expr)
 
llvm::ValueEmitObjCConsumeObject (QualType T, llvm::Value *Ptr)
 Produce the code for a CK_ARCConsumeObject. More...
 
llvm::ValueEmitObjCExtendObjectLifetime (QualType T, llvm::Value *Ptr)
 
llvm::ValueEmitARCExtendBlockObject (const Expr *expr)
 
llvm::ValueEmitARCReclaimReturnedObject (const Expr *e, bool allowUnsafeClaim)
 
llvm::ValueEmitARCRetainScalarExpr (const Expr *expr)
 EmitARCRetainScalarExpr - Semantically equivalent to EmitARCRetainObject(e->getType(), EmitScalarExpr(e)), but making a best-effort attempt to peephole expressions that naturally produce retained objects. More...
 
llvm::ValueEmitARCRetainAutoreleaseScalarExpr (const Expr *expr)
 
llvm::ValueEmitARCUnsafeUnretainedScalarExpr (const Expr *expr)
 EmitARCUnsafeUnretainedScalarExpr - Semantically equivalent to immediately releasing the resut of EmitARCRetainScalarExpr, but avoiding any spurious retains, including by performing reclaims with objc_unsafeClaimAutoreleasedReturnValue. More...
 
void EmitARCIntrinsicUse (ArrayRef< llvm::Value *> values)
 Given a number of pointers, inform the optimizer that they're being intrinsically used up until this point in the program. More...
 
void EmitObjCAutoreleasePoolPop (llvm::Value *Ptr)
 Produce the code to do a primitive release. More...
 
llvm::ValueEmitObjCAutoreleasePoolPush ()
 Produce the code to do a objc_autoreleasepool_push. More...
 
llvm::ValueEmitObjCMRRAutoreleasePoolPush ()
 Produce the code to do an MRR version objc_autoreleasepool_push. More...
 
void EmitObjCAutoreleasePoolCleanup (llvm::Value *Ptr)
 
void EmitObjCMRRAutoreleasePoolPop (llvm::Value *Ptr)
 Produce the code to do a primitive release. More...
 
RValue EmitReferenceBindingToExpr (const Expr *E)
 Emits a reference binding to the passed in expression. More...
 
llvm::ValueEmitScalarExpr (const Expr *E, bool IgnoreResultAssign=false)
 EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result. More...
 
llvm::ValueEmitScalarConversion (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. More...
 
llvm::ValueEmitComplexToScalarConversion (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. More...
 
void EmitAggExpr (const Expr *E, AggValueSlot AS)
 EmitAggExpr - Emit the computation of the specified expression of aggregate type. More...
 
LValue EmitAggExprToLValue (const Expr *E)
 EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue. More...
 
void EmitExtendGCLifetime (llvm::Value *object)
 EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point. More...
 
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. More...
 
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. More...
 
void EmitStoreOfComplex (ComplexPairTy V, LValue dest, bool isInit)
 EmitStoreOfComplex - Store a complex number into the specified l-value. More...
 
ComplexPairTy EmitLoadOfComplex (LValue src, SourceLocation loc)
 EmitLoadOfComplex - Load a complex number from the specified l-value. More...
 
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. More...
 
void EmitCXXGlobalVarDeclInit (const VarDecl &D, llvm::Constant *DeclPtr, bool PerformInit)
 EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage. More...
 
llvm::Constant * createAtExitStub (const VarDecl &VD, llvm::Constant *Dtor, llvm::Constant *Addr)
 Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function. More...
 
void registerGlobalDtorWithAtExit (const VarDecl &D, llvm::Constant *fn, llvm::Constant *addr)
 Call atexit() with a function that passes the given argument to the given function. More...
 
void EmitCXXGuardedInit (const VarDecl &D, llvm::GlobalVariable *DeclPtr, bool PerformInit)
 Emit code in this function to perform a guarded variable initialization. More...
 
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. More...
 
void GenerateCXXGlobalInitFunc (llvm::Function *Fn, ArrayRef< llvm::Function *> CXXThreadLocals, Address Guard=Address::invalid())
 GenerateCXXGlobalInitFunc - Generates code for initializing global variables. More...
 
void GenerateCXXGlobalDtorsFunc (llvm::Function *Fn, const std::vector< std::pair< llvm::WeakTrackingVH, llvm::Constant *>> &DtorsAndObjects)
 GenerateCXXGlobalDtorsFunc - Generates code for destroying global variables. More...
 
void GenerateCXXGlobalVarDeclInitFunc (llvm::Function *Fn, const VarDecl *D, llvm::GlobalVariable *Addr, bool PerformInit)
 Emit the code necessary to initialize the given global variable. More...
 
void EmitCXXConstructExpr (const CXXConstructExpr *E, AggValueSlot Dest)
 
void EmitSynthesizedCXXCopyCtor (Address Dest, Address Src, const Expr *Exp)
 
void enterFullExpression (const ExprWithCleanups *E)
 
void enterNonTrivialFullExpression (const ExprWithCleanups *E)
 Enter a full-expression with a non-trivial number of objects to clean up. More...
 
void EmitCXXThrowExpr (const CXXThrowExpr *E, bool KeepInsertionPoint=true)
 
void EmitLambdaExpr (const LambdaExpr *E, AggValueSlot Dest)
 
RValue EmitAtomicExpr (AtomicExpr *E)
 
llvm::ValueEmitAnnotationCall (llvm::Value *AnnotationFn, llvm::Value *AnnotatedVal, StringRef AnnotationStr, SourceLocation Location)
 Emit an annotation call (intrinsic or builtin). More...
 
void EmitVarAnnotations (const VarDecl *D, llvm::Value *V)
 Emit local annotations for the local variable V, declared by D. More...
 
Address EmitFieldAnnotations (const FieldDecl *D, Address V)
 Emit field annotations for the given field & value. More...
 
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. More...
 
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. More...
 
void EmitBranchOnBoolExpr (const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount)
 EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g. More...
 
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. More...
 
llvm::ValueEmitCheckedInBoundsGEP (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. More...
 
llvm::ValueEmitCheckedArgForBuiltin (const Expr *E, BuiltinCheckKind Kind)
 Emits an argument for a call to a builtin. More...
 
llvm::Constant * EmitCheckTypeDescriptor (QualType T)
 Emit a description of a type in a format suitable for passing to a runtime sanitizer handler. More...
 
llvm::ValueEmitCheckValue (llvm::Value *V)
 Convert a value into a format suitable for passing to a runtime sanitizer handler. More...
 
llvm::Constant * EmitCheckSourceLocation (SourceLocation Loc)
 Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler. More...
 
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 call a handler function in a sanitizer runtime with the provided arguments, and create a conditional branch to it. More...
 
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. More...
 
void EmitTrapCheck (llvm::Value *Checked)
 Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks. More...
 
llvm::CallInst * EmitTrapCall (llvm::Intrinsic::ID IntrID)
 Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified. More...
 
void EmitCfiCheckStub ()
 Emit a stub for the cross-DSO CFI check function. More...
 
void EmitCfiCheckFail ()
 Emit a cross-DSO CFI failure handling function. More...
 
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. More...
 
void EmitCallArg (CallArgList &args, const Expr *E, QualType ArgType)
 EmitCallArg - Emit a single call argument. More...
 
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. More...
 
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. More...
 
template<typename T >
void EmitCallArgs (CallArgList &Args, const T *CallArgTypeInfo, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, AbstractCallee AC=AbstractCallee(), unsigned ParamsToSkip=0, EvaluationOrder Order=EvaluationOrder::Default)
 EmitCallArgs - Emit call arguments for a function. More...
 
void EmitCallArgs (CallArgList &Args, ArrayRef< QualType > ArgTypes, 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)
 EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee. More...
 
llvm::ValueLoadPassedObjectSize (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. More...
 
void EmitSanitizerStatReport (llvm::SanitizerStatKind SSK)
 
- 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
 
llvm::CallingConv::ID getBuiltinCC () const
 
LangAS getASTAllocaAddressSpace () const
 

Static Public Member Functions

static void destroyBlockInfos (CGBlockInfo *info)
 Destroy a chain of block layouts. More...
 
static bool IsConstructorDelegationValid (const CXXConstructorDecl *Ctor)
 Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e. More...
 
static TypeEvaluationKind getEvaluationKind (QualType T)
 getEvaluationKind - Return the TypeEvaluationKind of QualType T. More...
 
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. More...
 
static bool IsWrappedCXXThis (const Expr *E)
 Check if E is a C++ "this" pointer wrapped in value-preserving casts. More...
 
static bool ShouldNullCheckClassCastValue (const CastExpr *Cast)
 
static bool isNullPointerAllowed (TypeCheckKind TCK)
 Determine whether the pointer type check TCK permits null pointers. More...
 
static bool isVptrCheckRequired (TypeCheckKind TCK, QualType Ty)
 Determine whether the pointer type check TCK requires a vptr check. More...
 
static void EmitOMPTargetDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetDirective &S)
 Emit device code for the target directive. More...
 
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. More...
 
static void EmitOMPTargetParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForSimdDirective &S)
 Emit device code for the target parallel for simd directive. More...
 
static void EmitOMPTargetTeamsDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDirective &S)
 Emit device code for the target teams directive. More...
 
static void EmitOMPTargetTeamsDistributeDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeDirective &S)
 Emit device code for the target teams distribute directive. More...
 
static void EmitOMPTargetTeamsDistributeSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeSimdDirective &S)
 Emit device code for the target teams distribute simd directive. More...
 
static void EmitOMPTargetSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetSimdDirective &S)
 Emit device code for the target simd directive. More...
 
static bool ContainsLabel (const Stmt *S, bool IgnoreCaseStmts=false)
 ContainsLabel - Return true if the statement contains a label in it. More...
 
static bool containsBreak (const Stmt *S)
 containsBreak - Return true if the statement contains a break out of it. More...
 
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. More...
 
static bool isObjCMethodWithTypeParams (const ObjCMethodDecl *method)
 
template<typename T >
static bool isObjCMethodWithTypeParams (const T *)
 

Public Attributes

CodeGenModuleCGM
 
const TargetInfoTarget
 
LoopInfoStack LoopStack
 
CGBuilderTy Builder
 
VarBypassDetector Bypasses
 
const DeclCurFuncDecl
 CurFuncDecl - Holds the Decl for the current outermost non-closure context. More...
 
const DeclCurCodeDecl
 CurCodeDecl - This is the inner-most code context, which includes blocks. More...
 
const CGFunctionInfoCurFnInfo
 
QualType FnRetTy
 
llvm::Function * CurFn
 
CGCoroInfo CurCoro
 
GlobalDecl CurGD
 CurGD - The GlobalDecl for the current function being compiled. More...
 
EHScopeStack::stable_iterator PrologueCleanupDepth
 PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters. More...
 
JumpDest ReturnBlock
 ReturnBlock - Unified return block. More...
 
Address ReturnValue
 ReturnValue - The temporary alloca to hold the return value. More...
 
llvm::AssertingVH< llvm::Instruction > AllocaInsertPt
 AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas. More...
 
CGCapturedStmtInfoCapturedStmtInfo
 
SanitizerSet SanOpts
 Sanitizers enabled for this function. More...
 
bool IsSanitizerScope
 True if CodeGen currently emits code implementing sanitizer checks. More...
 
bool CurFuncIsThunk
 In C++, whether we are code generating a thunk. More...
 
bool AutoreleaseResult
 In ARC, whether we should autorelease the return value. More...
 
bool SawAsmBlock
 Whether we processed a Microsoft-style asm block during CodeGen. More...
 
const FunctionDeclCurSEHParent = nullptr
 
bool IsOutlinedSEHHelper
 True if the current function is an outlined SEH helper. More...
 
const CodeGen::CGBlockInfoBlockInfo
 
llvm::ValueBlockPointer
 
llvm::DenseMap< const VarDecl *, FieldDecl * > LambdaCaptureFields
 
FieldDeclLambdaThisCaptureField
 
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. More...
 
EHScopeStack EHStack
 
llvm::SmallVector< char, 256 > LifetimeExtendedCleanupStack
 
llvm::SmallVector< const JumpDest *, 2 > SEHTryEpilogueStack
 
llvm::Instruction * CurrentFuncletPad = nullptr
 
llvm::AllocaInst * NormalCleanupDest
 i32s containing the indexes of the cleanup destinations. More...
 
unsigned NextCleanupDestIndex
 
CGBlockInfoFirstBlockInfo
 FirstBlockInfo - The head of a singly-linked-list of block layouts. More...
 
llvm::BasicBlock * EHResumeBlock
 EHResumeBlock - Unified block containing a call to llvm.eh.resume. More...
 
llvm::ValueExceptionSlot
 The exception slot. More...
 
llvm::AllocaInst * EHSelectorSlot
 The selector slot. More...
 
SmallVector< Address, 1 > SEHCodeSlotStack
 A stack of exception code slots. More...
 
llvm::ValueSEHInfo = nullptr
 Value returned by __exception_info intrinsic. More...
 
SmallVector< llvm::Value *, 8 > ObjCEHValueStack
 ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows. More...
 
- Public Attributes inherited from clang::CodeGen::CodeGenTypeCache
llvm::TypeVoidTy
 void More...
 
llvm::IntegerType * Int8Ty
 i8, i16, i32, and i64 More...
 
llvm::IntegerType * Int16Ty
 
llvm::IntegerType * Int32Ty
 
llvm::IntegerType * Int64Ty
 
llvm::TypeFloatTy
 float, double More...
 
llvm::TypeDoubleTy
 
llvm::IntegerType * IntTy
 int More...
 
union {
   llvm::IntegerType *   IntPtrTy
 
   llvm::IntegerType *   SizeTy
 
   llvm::IntegerType *   PtrDiffTy
 
}; 
 intptr_t, size_t, and ptrdiff_t, which we assume are the same size. More...
 
union {
   llvm::PointerType *   VoidPtrTy
 
   llvm::PointerType *   Int8PtrTy
 
}; 
 void* in address space 0 More...
 
union {
   llvm::PointerType *   VoidPtrPtrTy
 
   llvm::PointerType *   Int8PtrPtrTy
 
}; 
 void** in address space 0 More...
 
union {
   llvm::PointerType *   AllocaVoidPtrTy
 
   llvm::PointerType *   AllocaInt8PtrTy
 
}; 
 void* in alloca address space More...
 
union {
   unsigned char   IntSizeInBytes
 
   unsigned char   IntAlignInBytes
 
}; 
 The size and alignment of the builtin C type 'int'. More...
 
unsigned char PointerWidthInBits
 The width of a pointer into the generic address space. More...
 
union {
   unsigned char   PointerAlignInBytes
 
   unsigned char   PointerSizeInBytes
 
}; 
 The size and alignment of a pointer into the generic address space. More...
 
union {
   unsigned char   SizeSizeInBytes
 
   unsigned char   SizeAlignInBytes
 
}; 
 The size and alignment of size_t. More...
 
LangAS ASTAllocaAddressSpace
 
llvm::CallingConv::ID RuntimeCC
 
llvm::CallingConv::ID BuiltinCC
 

Static Public Attributes

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

Friends

class CGCXXABI
 

Detailed Description

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

Definition at line 142 of file CodeGenFunction.h.

Member Typedef Documentation

◆ CodeGenDispatchBoundsTy

Definition at line 201 of file CodeGenFunction.h.

◆ CodeGenLoopBoundsTy

Definition at line 195 of file CodeGenFunction.h.

◆ CodeGenLoopTy

Definition at line 187 of file CodeGenFunction.h.

◆ CodeGenOrderedTy

typedef llvm::function_ref<void(CodeGenFunction &, SourceLocation, const unsigned, const bool)> clang::CodeGen::CodeGenFunction::CodeGenOrderedTy

Definition at line 190 of file CodeGenFunction.h.

◆ ComplexPairTy

Definition at line 176 of file CodeGenFunction.h.

◆ DeclMapTy

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

Definition at line 693 of file CodeGenFunction.h.

◆ Destroyer

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

Definition at line 1488 of file CodeGenFunction.h.

◆ SpecialInitFn

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

Definition at line 2431 of file CodeGenFunction.h.

◆ TaskGenTy

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

Definition at line 2819 of file CodeGenFunction.h.

◆ VisitedVirtualBasesSetTy

Definition at line 1704 of file CodeGenFunction.h.

◆ VPtrsVector

Definition at line 1702 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 3700 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 3716 of file CodeGenFunction.h.

◆ CFITypeCheckKind

Enumerator
CFITCK_VCall 
CFITCK_NVCall 
CFITCK_DerivedCast 
CFITCK_UnrelatedCast 
CFITCK_ICall 

Definition at line 1720 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 3856 of file CodeGenFunction.h.

◆ GuardKind

Enumerator
VariableGuard 
TlsGuard 

Definition at line 3597 of file CodeGenFunction.h.

◆ TypeCheckKind

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

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.

Definition at line 2344 of file CodeGenFunction.h.

Constructor & Destructor Documentation

◆ CodeGenFunction()

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

Definition at line 64 of file CodeGenFunction.cpp.

◆ ~CodeGenFunction()

CodeGenFunction::~CodeGenFunction ( )

Member Function Documentation

◆ ActivateCleanupBlock()

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

ActivateCleanupBlock - Activates an initially-inactive cleanup.

Activate a cleanup that was created in an inactivated state.

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.

Definition at line 1218 of file CGCleanup.cpp.

References ForActivation, and SetupCleanupBlockActivation().

◆ AddInitializerToStaticVarDecl()

llvm::GlobalVariable * 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.

Definition at line 313 of file CGDecl.cpp.

References CGM, clang::frontend::CPlusPlus, EmitCXXGuardedInit(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::ConstantEmitter::finalize(), clang::CodeGen::CodeGenModule::getContext(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), hasNontrivialDestruction(), HaveInsertPoint(), clang::CodeGen::CodeGenModule::isTypeConstant(), and clang::CodeGen::ConstantEmitter::tryEmitForInitializer().

Referenced by EmitStaticVarDecl().

◆ AlwaysEmitXRayCustomEvents()

bool CodeGenFunction::AlwaysEmitXRayCustomEvents ( ) const

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

AlwaysEmitXRayCustomEvents - Return true if we should emit IR for calls to the __xray_customevent(...) builin calls, when doing XRay instrumentation.

Definition at line 466 of file CodeGenFunction.cpp.

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

◆ BuildAppleKextVirtualCall()

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

BuildAppleKextVirtualCall - This routine is to support gcc's kext ABI making indirect call to virtual functions.

It makes the call through indexing into the vtable.

Definition at line 290 of file CGCXX.cpp.

References BuildAppleKextVirtualCall(), clang::Dtor_Complete, clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::RecordType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::T, and clang::NestedNameSpecifier::TypeSpec.

◆ BuildAppleKextVirtualDestructorCall()

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

BuildVirtualCall - This routine makes indirect vtable call for call to virtual destructors.

It returns 0 if it could not do it.

Definition at line 311 of file CGCXX.cpp.

References BuildAppleKextVirtualCall(), clang::CodeGen::Complete, clang::Dtor_Base, clang::CXXMethodDecl::isVirtual(), and clang::CodeGen::Type.

◆ BuildBlockRelease()

void CodeGenFunction::BuildBlockRelease ( llvm::Value DeclPtr,
BlockFieldFlags  flags 
)

◆ BuildFunctionArgList()

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

◆ BuildVector()

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

Definition at line 7486 of file CGBuiltin.cpp.

◆ checkTargetFeatures()

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

Definition at line 2245 of file CodeGenFunction.cpp.

◆ ConstantFoldsToSimpleInteger() [1/2]

bool CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr Cond,
bool ResultBool,
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.

Definition at line 1437 of file CodeGenFunction.cpp.

Referenced by EmitBranchOnBoolExpr(), emitCommonOMPTargetDirective(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), GetIntrinsic(), and isCheapEnoughToEvaluateUnconditionally().

◆ ConstantFoldsToSimpleInteger() [2/2]

bool CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr Cond,
llvm::APSInt &  ResultInt,
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.

Definition at line 1451 of file CodeGenFunction.cpp.

References ContainsLabel(), clang::Expr::EvaluateAsInt(), and getContext().

◆ containsBreak()

bool 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.

Definition at line 1390 of file CodeGenFunction.cpp.

◆ ContainsLabel()

bool 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.

Definition at line 1358 of file CodeGenFunction.cpp.

Referenced by ConstantFoldsToSimpleInteger(), EmitAutoVarInit(), EmitConditionalOperatorLValue(), GetIntrinsic(), and isCheapEnoughToEvaluateUnconditionally().

◆ convertTempToRValue()

RValue CodeGenFunction::convertTempToRValue ( Address  addr,
QualType  type,
SourceLocation  loc 
)

◆ ConvertType() [1/2]

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

◆ ConvertType() [2/2]

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

Definition at line 1818 of file CodeGenFunction.h.

◆ ConvertTypeForMem()

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

◆ CreateAggTemp()

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

CreateAggTemp - Create a temporary memory object for the given aggregate type.

Definition at line 2030 of file CodeGenFunction.h.

◆ createAtExitStub()

llvm::Constant * CodeGenFunction::createAtExitStub ( const VarDecl VD,
llvm::Constant *  dtor,
llvm::Constant *  addr 
)

◆ createBasicBlock()

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

◆ CreateDefaultAlignTempAlloca()

Address CodeGenFunction::CreateDefaultAlignTempAlloca ( llvm::Type Ty,
const Twine &  Name = "tmp" 
)

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

CreateDefaultAlignTempAlloca - This creates an alloca with the default alignment of the corresponding LLVM type, which is not guaranteed to be related in any way to the expected alignment of an AST type that might have been lowered to Ty.

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.

Definition at line 107 of file CGExpr.cpp.

Referenced by EmitCheckValue(), and StartFunction().

◆ CreateIRTemp()

Address 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.

Definition at line 122 of file CGExpr.cpp.

Referenced by StartFunction().

◆ CreateMemTemp() [1/2]

Address CodeGenFunction::CreateMemTemp ( QualType  T,
const Twine &  Name = "tmp",
bool  CastToDefaultAddrSpace = true 
)

◆ CreateMemTemp() [2/2]

Address CodeGenFunction::CreateMemTemp ( QualType  T,
CharUnits  Align,
const Twine &  Name = "tmp",
bool  CastToDefaultAddrSpace = true 
)

Definition at line 134 of file CGExpr.cpp.

◆ CreateTempAlloca() [1/2]

llvm::AllocaInst * 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 by default. The cast may be avoided by passing false as CastToDefaultAddrSpace; this is more efficient if the caller knows that the address will not be exposed.

Definition at line 94 of file CGExpr.cpp.

Referenced by CreateTempAllocaForCoercion(), EmitAutoVarAlloca(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), InitCatchParam(), isTrivialFiller(), clang::CodeGen::DominatingLLVMValue::save(), SetupCleanupBlockActivation(), and SymbolNameForMethod().

◆ CreateTempAlloca() [2/2]

Address CodeGenFunction::CreateTempAlloca ( llvm::Type Ty,
CharUnits  Align,
const Twine &  Name = "tmp",
llvm::Value ArraySize = nullptr,
bool  CastToDefaultAddrSpace = true 
)

CreateTempAlloca - This creates a alloca and inserts it into the entry block.

Definition at line 64 of file CGExpr.cpp.

◆ currentFunctionUsesSEHTry()

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

Definition at line 1476 of file CodeGenFunction.h.

◆ DeactivateCleanupBlock()

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

DeactivateCleanupBlock - Deactivates the given cleanup block.

Deactive a cleanup that was created in an active state.

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.

Definition at line 1230 of file CGCleanup.cpp.

Referenced by isTrivialFiller().

◆ DecodeAddrUsedInPrologue()

llvm::Value * CodeGenFunction::DecodeAddrUsedInPrologue ( llvm::Value F,
llvm::Value EncodedAddr 
)

Decode an address used in a function prologue, encoded by EncodeAddrForUseInPrologue.

Definition at line 494 of file CodeGenFunction.cpp.

References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.

◆ destroyBlockInfos()

void CodeGenFunction::destroyBlockInfos ( CGBlockInfo info)
static

Destroy a chain of block layouts.

Definition at line 733 of file CGBlocks.cpp.

References clang::CodeGen::CGBlockInfo::NextBlockInfo.

Referenced by ~CodeGenFunction().

◆ disableDebugInfo()

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

◆ EmitAArch64BuiltinExpr()

Value * CodeGenFunction::EmitAArch64BuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

Definition at line 5712 of file CGBuiltin.cpp.

Referenced by EmitTargetArchBuiltinExpr().

◆ EmitAArch64CompareBuiltinExpr()

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

Definition at line 4624 of file CGBuiltin.cpp.

◆ emitAddrOfImagComponent()

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

Definition at line 331 of file CGExprComplex.cpp.

References clang::Type::castAs().

◆ emitAddrOfRealComponent()

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

Definition at line 325 of file CGExprComplex.cpp.

References clang::CharUnits::Zero().

◆ EmitAggExpr()

void CodeGenFunction::EmitAggExpr ( const Expr E,
AggValueSlot  Slot 
)

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.

The result is computed into DestPtr. Note that if DestPtr is null, the value of the aggregate expression is not needed. If VolatileDest is true, DestPtr cannot be 0.

Definition at line 1522 of file CGExprAgg.cpp.

References CheckAggExprForMemSetUse(), clang::CodeGen::AggValueSlot::getAddress(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::isIgnored(), and clang::CodeGen::Address::isValid().

Referenced by EmitBaseInitializer(), EmitDeclInit(), EmitExprAsInit(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), isBlockVarRef(), isTrivialFiller(), and StoreAnyExprIntoOneUnit().

◆ EmitAggExprToLValue()

LValue CodeGenFunction::EmitAggExprToLValue ( const Expr E)

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

Definition at line 1534 of file CGExprAgg.cpp.

References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::forLValue(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::IsNotAliased, and clang::CodeGen::AggValueSlot::IsNotDestructed.

Referenced by EmitConditionalOperatorLValue().

◆ EmitAggregateAssign()

void clang::CodeGen::CodeGenFunction::EmitAggregateAssign ( Address  DestPtr,
Address  SrcPtr,
QualType  EltTy 
)
inline

EmitAggregateCopy - Emit an aggregate assignment.

The difference to EmitAggregateCopy is that tail padding is not copied. This is required for correctness when assigning non-POD structures in C++.

Definition at line 2096 of file CodeGenFunction.h.

Referenced by emitPrivatesInit().

◆ EmitAggregateCopy()

void CodeGenFunction::EmitAggregateCopy ( Address  DestPtr,
Address  SrcPtr,
QualType  EltTy,
bool  isVolatile = false,
bool  isAssignment = false 
)

◆ EmitAggregateCopyCtor()

void clang::CodeGen::CodeGenFunction::EmitAggregateCopyCtor ( Address  DestPtr,
Address  SrcPtr,
QualType  DestTy,
QualType  SrcTy 
)
inline

Definition at line 2102 of file CodeGenFunction.h.

◆ EmitAlignmentAssumption() [1/2]

void clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption ( llvm::Value PtrValue,
unsigned  Alignment,
llvm::Value OffsetValue = nullptr 
)
inline

◆ EmitAlignmentAssumption() [2/2]

void clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption ( llvm::Value PtrValue,
llvm::Value Alignment,
llvm::Value OffsetValue = nullptr 
)
inline

◆ EmitAMDGPUBuiltinExpr()

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

Definition at line 9085 of file CGBuiltin.cpp.

References clang::CallExpr::getArg(), and X.

Referenced by EmitTargetArchBuiltinExpr().

◆ EmitAnnotationCall()

llvm::Value * CodeGenFunction::EmitAnnotationCall ( llvm::Value AnnotationFn,
llvm::Value AnnotatedVal,
StringRef  AnnotationStr,
SourceLocation  Location 
)

◆ EmitAnyExpr()

RValue 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.

The result is returned as an RValue struct. If this is an aggregate expression, AggSlot indicates where the result should be returned.

Definition at line 173 of file CGExpr.cpp.

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitOMPAtomicCaptureExpr(), EmitOMPAtomicUpdateExpr(), emitSimdlenSafelenClause(), and GenerateObjCAtomicGetterCopyHelperFunction().

◆ EmitAnyExprToExn()

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

◆ EmitAnyExprToMem()

void CodeGenFunction::EmitAnyExprToMem ( const Expr E,
Address  Location,
Qualifiers  Quals,
bool  IsInit 
)

EmitAnyExprToMem - Emits the code necessary to evaluate an arbitrary expression into the given memory location.

EmitAnyExprToMem - Evaluate an expression into a given memory location.

Definition at line 202 of file CGExpr.cpp.

Referenced by emitCombinerOrInitializer(), emitCXXDestructor(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitInitWithReductionInitializer(), EmitOMPAggregateInit(), clang::CodeGen::emitTaskLoopCall(), and clang::CodeGen::emitThreadPrivateVarDefinition().

◆ EmitAnyExprToTemp()

RValue CodeGenFunction::EmitAnyExprToTemp ( const Expr E)

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

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

Definition at line 192 of file CGExpr.cpp.

◆ EmitARCAutorelease()

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

Autorelease the given object.

call i8* @objc_autorelease(i8* value)

Definition at line 2195 of file CGObjC.cpp.

References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autorelease.

Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().

◆ EmitARCAutoreleaseReturnValue()

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

Autorelease the given object.

call i8* @objc_autoreleaseReturnValue(i8* value)

Definition at line 2204 of file CGObjC.cpp.

References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autoreleaseReturnValue.

Referenced by emitAutoreleaseOfResult().

◆ EmitARCCopyWeak()

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

void @objc_copyWeak(i8** dest, i8** src) Disregards the current value in dest.

Essentially objc_release(objc_initWeak(dest, objc_readWeakRetained(src)))

Definition at line 2322 of file CGObjC.cpp.

References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_copyWeak.

Referenced by tryEmitARCCopyWeakInit().

◆ EmitARCDestroyStrong()

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

Destroy a __strong variable.

At -O0, emit a call to store 'null' into the address; instrumenting tools prefer this because the address is exposed, but it's relatively cumbersome to optimize.

At -O1 and above, just load and call objc_release.

call void @objc_storeStrong(i8** addr, i8* null)

Definition at line 2120 of file CGObjC.cpp.

References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCRelease(), EmitARCStoreStrongCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and getNullForVariable().

Referenced by EmitObjCMRRAutoreleasePoolPop(), and EmitObjectDelete().

◆ EmitARCDestroyWeak()

void CodeGenFunction::EmitARCDestroyWeak ( Address  addr)

◆ EmitARCExtendBlockObject()

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

◆ EmitARCInitWeak()

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

i8* @objc_initWeak(i8** addr, i8* value) Returns value.

addr is known to not have a current weak entry. Essentially equivalent to: *addr = nil; objc_storeWeak(addr, value);

Definition at line 2278 of file CGObjC.cpp.

References Builder, clang::CodeGen::CGBuilderTy::CreateStore(), emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_initWeak.

Referenced by clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitParmDecl(), EmitScalarInit(), EmitStoreThroughLValue(), and InitCatchParam().

◆ EmitARCIntrinsicUse()

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

Given a number of pointers, inform the optimizer that they're being intrinsically used up until this point in the program.

Definition at line 1803 of file CGObjC.cpp.

References clang::CodeGen::ObjCEntrypoints::clang_arc_use, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitObjCMRRAutoreleasePoolPop(), and emitWriteback().

◆ EmitARCLoadWeak()

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

i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).

Definition at line 2251 of file CGObjC.cpp.

References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_loadWeak.

Referenced by EmitLoadOfLValue(), and generateObjCGetterBody().

◆ EmitARCLoadWeakRetained()

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

◆ EmitARCMoveWeak()

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

void @objc_moveWeak(i8** dest, i8** src) Disregards the current value in dest.

Leaves src pointing to nothing. Essentially (objc_copyWeak(dest, src), objc_destroyWeak(src)).

Definition at line 2313 of file CGObjC.cpp.

References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_moveWeak.

Referenced by tryEmitARCCopyWeakInit().

◆ EmitARCReclaimReturnedObject()

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

Definition at line 2581 of file CGObjC.cpp.

Referenced by EmitObjCThrowOperand(), and ShouldNullCheckClassCastValue().

◆ EmitARCRelease()

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

◆ EmitARCRetain()

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

Produce the code to do a retain.

Based on the type, calls one of: call i8* @objc_retain(i8* value) call i8* @objc_retainBlock(i8* value)

Definition at line 1972 of file CGObjC.cpp.

References EmitARCRetainBlock(), EmitARCRetainNonBlock(), and clang::Type::isBlockPointerType().

Referenced by emitARCRetainLoadOfScalar(), EmitARCRetainScalarExpr(), EmitARCStoreStrong(), and EmitStoreThroughLValue().

◆ EmitARCRetainAutorelease()

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

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutorelease(i8* value) or retain = call i8* @objc_retainBlock(i8* value) call i8* @objc_autorelease(i8* retain)

Definition at line 2226 of file CGObjC.cpp.

References Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Type::isBlockPointerType(), and clang::CodeGen::Type.

Referenced by EmitARCRetainAutoreleaseScalarExpr(), and EmitObjCExtendObjectLifetime().

◆ EmitARCRetainAutoreleasedReturnValue()

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

Retain the given object which is the result of a function call.

call i8* @objc_retainAutoreleasedReturnValue(i8* value)

Yes, this function name is one character away from a different call with completely different semantics.

Definition at line 2064 of file CGObjC.cpp.

References emitARCValueOperation(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutoreleasedReturnValue.

Referenced by emitARCRetainCallResult().

◆ EmitARCRetainAutoreleaseNonBlock()

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

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutorelease(i8* value)

Definition at line 2243 of file CGObjC.cpp.

References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutorelease.

Referenced by EmitARCRetainAutorelease().

◆ EmitARCRetainAutoreleaseReturnValue()

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

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutoreleaseReturnValue(i8* value)

Definition at line 2214 of file CGObjC.cpp.

References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutoreleaseReturnValue.

◆ EmitARCRetainAutoreleaseScalarExpr()

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

◆ EmitARCRetainBlock()

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

Retain the given block, with _Block_copy semantics.

call i8* @objc_retainBlock(i8* value)

Parameters
mandatory- If false, emit the call with metadata indicating that it's okay for the optimizer to eliminate this call if it can prove that the block never escapes except down the stack.

Definition at line 1993 of file CGObjC.cpp.

References Builder, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainBlock.

Referenced by EmitARCExtendBlockObject(), EmitARCRetain(), EmitARCRetainAutorelease(), and EmitARCStoreStrong().

◆ EmitARCRetainNonBlock()

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

◆ EmitARCRetainScalarExpr()

llvm::Value * CodeGenFunction::EmitARCRetainScalarExpr ( const Expr e)

EmitARCRetainScalarExpr - Semantically equivalent to EmitARCRetainObject(e->getType(), EmitScalarExpr(e)), but making a best-effort attempt to peephole expressions that naturally produce retained objects.

Definition at line 2967 of file CGObjC.cpp.

References EmitARCRetain(), enterFullExpression(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().

Referenced by EmitScalarInit(), and ShouldNullCheckClassCastValue().

◆ EmitARCStoreAutoreleasing()

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

◆ EmitARCStoreStrong() [1/2]

llvm::Value * CodeGenFunction::EmitARCStoreStrong ( LValue  dst,
llvm::Value newValue,
bool  ignored 
)

◆ EmitARCStoreStrong() [2/2]

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

◆ EmitARCStoreStrongCall()

llvm::Value * CodeGenFunction::EmitARCStoreStrongCall ( Address  addr,
llvm::Value value,
bool  ignored 
)

◆ EmitARCStoreUnsafeUnretained()

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

◆ EmitARCStoreWeak()

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

i8* @objc_storeWeak(i8** addr, i8* value) Returns value.

Definition at line 2266 of file CGObjC.cpp.

References emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_storeWeak.

Referenced by EmitScalarInit(), EmitStoreThroughLValue(), and GetIntrinsic().

◆ EmitARCUnsafeClaimAutoreleasedReturnValue()

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

Claim a possibly-autoreleased return value at +0.

This is only valid to do in contexts which do not rely on the retain to keep the object valid for for all of its uses; for example, when the value is ignored, or when it is being assigned to an __unsafe_unretained variable.

call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* value)

Definition at line 2079 of file CGObjC.cpp.

References emitARCValueOperation(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_unsafeClaimAutoreleasedReturnValue.

Referenced by emitARCUnsafeClaimCallResult().

◆ EmitARCUnsafeUnretainedScalarExpr()

llvm::Value * CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr ( const Expr e)

EmitARCUnsafeUnretainedScalarExpr - Semantically equivalent to immediately releasing the resut of EmitARCRetainScalarExpr, but avoiding any spurious retains, including by performing reclaims with objc_unsafeClaimAutoreleasedReturnValue.

Definition at line 3094 of file CGObjC.cpp.

References emitARCUnsafeUnretainedScalarExpr(), and enterFullExpression().

Referenced by EmitARCStoreUnsafeUnretained(), and EmitScalarInit().

◆ EmitARMBuiltinExpr()

Value * CodeGenFunction::EmitARMBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

Definition at line 4818 of file CGBuiltin.cpp.

References clang::Expr::EvaluateAsInt(), and clang::CallExpr::getArg().

Referenced by EmitTargetArchBuiltinExpr().

◆ emitArrayDestroy()

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

emitArrayDestroy - Destroys all the elements of the given array, beginning from last to first.

The array cannot be zero-length.

Parameters
begin- a type* denoting the first element of the array
end- a type* denoting one past the end of the array
elementType- the element type of the array
destroyer- the function to call to destroy elements
useEHCleanup- whether to push an EH cleanup to destroy the remaining elements in case the destruction of a single element throws

Definition at line 1576 of file CGDecl.cpp.

References Builder, createBasicBlock(), EmitBlock(), clang::Type::isArrayType(), PopCleanupBlock(), pushRegularPartialArrayCleanup(), and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by emitDestroy(), and emitPartialArrayDestroy().

◆ emitArrayLength()

llvm::Value * CodeGenFunction::emitArrayLength ( const ArrayType origArrayType,
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.

Computes the length of an array in elements, as well as the base element type and a properly-typed first element pointer.

Definition at line 1830 of file CodeGenFunction.cpp.

References clang::ast_matchers::arrayType, Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getElementType(), clang::ArrayType::getElementType(), clang::CodeGen::Address::getPointer(), getVLASize(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::CodeGen::Type.

Referenced by emitDestroy(), EmitOMPAggregateInit(), and EmitOMPAggregateReduction().

◆ EmitArraySubscriptExpr()

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

Definition at line 3230 of file CGExpr.cpp.

◆ EmitArrayToPointerDecay()

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

Definition at line 3111 of file CGExpr.cpp.

Referenced by ShouldNullCheckClassCastValue().

◆ EmitAsanPrologueOrEpilogue()

void CodeGenFunction::EmitAsanPrologueOrEpilogue ( bool  Prologue)

◆ EmitAsmStmt()

void CodeGenFunction::EmitAsmStmt ( const AsmStmt S)

Definition at line 1861 of file CGStmt.cpp.

◆ EmitAtomicCompareExchange()

std::pair< RValue, llvm::Value * > 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 CodeGenFunction::EmitAtomicExpr ( AtomicExpr E)

Definition at line 742 of file CGAtomic.cpp.

◆ EmitAtomicInit()

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

◆ EmitAtomicLoad() [1/2]

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

◆ EmitAtomicLoad() [2/2]

RValue CodeGenFunction::EmitAtomicLoad ( LValue  src,
SourceLocation  loc,
llvm::AtomicOrdering  AO,
bool  IsVolatile = false,
AggValueSlot  resultSlot = AggValueSlot::ignored() 
)

◆ EmitAtomicStore() [1/2]

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

◆ EmitAtomicStore() [2/2]

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

Emit a store to an l-value of atomic type.

Note that the r-value is expected to be an r-value of the atomic type; this means that for aggregate r-values, it should include storage for any padding that was necessary.

Definition at line 1889 of file CGAtomic.cpp.

References clang::CodeGen::CallArgList::add(), emitAtomicLibcall(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::Address::getElementType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::RValue::isAggregate(), and clang::CodeGen::LValue::isSimple().

◆ EmitAtomicUpdate()

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

Definition at line 1973 of file CGAtomic.cpp.

◆ EmitAttributedStmt()

void CodeGenFunction::EmitAttributedStmt ( const AttributedStmt S)

Definition at line 557 of file CGStmt.cpp.

◆ EmitAutoVarAlloca()

CodeGenFunction::AutoVarEmission CodeGenFunction::EmitAutoVarAlloca ( const VarDecl D)

EmitAutoVarAlloca - Emit the alloca and debug information for a local variable.

Does not emit initialization or destruction.

Definition at line 961 of file CGDecl.cpp.

References Builder, Bypasses, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), clang::Default, EmitLifetimeStart(), EmitStaticVarDecl(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getBlockByrefInfo(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::NamedDecl::getName(), clang::CodeGen::Address::getPointer(), getTarget(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), hasLabelBeenSeenInCurrentScope(), HaveInsertPoint(), clang::InternalLinkage, clang::CodeGen::Address::invalid(), clang::Type::isArrayType(), clang::CodeGen::VarBypassDetector::IsBypassed(), clang::Expr::isConstantInitializer(), clang::Type::isConstantSizeType(), clang::VarDecl::isConstexpr(), clang::VarDecl::isExceptionVariable(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isNRVOVariable(), clang::Type::isObjCObjectPointerType(), clang::QualType::isPODType(), clang::Type::isRecordType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::Type::isVariablyModifiedType(), NRVOFlags, clang::CharUnits::One(), clang::opencl_constant, clang::opencl_private, ReturnValue, clang::CodeGen::Type, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().

Referenced by EmitAutoVarDecl().

◆ EmitAutoVarCleanups()

void CodeGenFunction::EmitAutoVarCleanups ( const AutoVarEmission emission)

◆ EmitAutoVarDecl()

void CodeGenFunction::EmitAutoVarDecl ( const VarDecl D)

EmitAutoVarDecl - Emit an auto variable declaration.

EmitAutoVarDecl - Emit code and set up an entry in LocalDeclMap for a variable declaration with auto, register, or no storage class specifier.

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

These turn into simple stack objects, or GlobalValues depending on target.

Definition at line 929 of file CGDecl.cpp.

References EmitAutoVarAlloca(), EmitAutoVarCleanups(), and EmitAutoVarInit().

Referenced by EmitVarDecl().

◆ EmitAutoVarInit()

void CodeGenFunction::EmitAutoVarInit ( const AutoVarEmission emission)

◆ emitAutoVarTypeCleanup()

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

◆ EmitBinaryOperatorLValue()

LValue CodeGenFunction::EmitBinaryOperatorLValue ( const BinaryOperator E)

Definition at line 4271 of file CGExpr.cpp.

◆ EmitBlock()

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

◆ EmitBlockAfterUses()

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

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

Definition at line 473 of file CGStmt.cpp.

References Builder, and CurFn.

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

◆ emitBlockByrefAddress() [1/2]

Address 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.

Definition at line 2265 of file CGBlocks.cpp.

References clang::NamedDecl::getName().

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

◆ emitBlockByrefAddress() [2/2]

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

Definition at line 2272 of file CGBlocks.cpp.

◆ EmitBlockCallExpr()

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

Definition at line 1100 of file CGBlocks.cpp.

◆ EmitBlockCopyAndAutorelease()

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

◆ EmitBlockLiteral()

llvm::Value * CodeGenFunction::EmitBlockLiteral ( const BlockExpr blockExpr,
llvm::Function **  InvokeF = nullptr 
)

Emit block literal.

Emit a block literal expression in the current function.

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.
Parameters
InvokeFwill contain the block invoke function if it is not nullptr.

Definition at line 743 of file CGBlocks.cpp.

References clang::CodeGen::CGBlockInfo::Block, clang::CodeGen::BLOCK_HAS_COPY_DISPOSE, clang::CodeGen::BLOCK_HAS_CXX_OBJ, clang::CodeGen::BLOCK_HAS_EXTENDED_LAYOUT, clang::CodeGen::BLOCK_HAS_SIGNATURE, clang::CodeGen::BLOCK_USE_STRET, clang::CodeGen::CGBlockInfo::BlockExpression, buildBlockDescriptor(), clang::CodeGen::CGBlockInfo::CanBeGlobal, computeBlockInfo(), clang::Default, findAndRemoveBlockInfo(), clang::CharUnits::fromQuantity(), clang::CodeGen::CodeGenModule::getAddrOfGlobalBlockIfEmitted(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::BlockExpr::getBlockDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::ASTContext::getLangOpts(), clang::CodeGen::CodeGenModule::getNSConcreteStackBlock(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::TargetInfo::getPointerWidth(), clang::CodeGen::CodeGenModule::getTarget(), clang::ASTContext::getTargetAddressSpace(), clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout, clang::BlockDecl::hasCaptures(), clang::CodeGen::CGBlockInfo::HasCXXObject, clang::isa(), clang::BlockDecl::isConversionFromLambda(), clang::CodeGen::Address::isValid(), clang::CodeGen::CGBlockInfo::LocalAddress, clang::CodeGen::CGBlockInfo::NeedsCopyDispose, clang::opencl_generic, and clang::CodeGen::CGBlockInfo::UsesStret.

Referenced by isCheapEnoughToEvaluateUnconditionally().

◆ EmitBlockWithFallThrough()

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

When instrumenting to collect profile data, the counts for some blocks such as switch cases need to not include the fall-through counts, so emit a branch around the instrumentation code.

When not instrumenting, this just calls EmitBlock().

Definition at line 1159 of file CodeGenFunction.cpp.

◆ EmitBoundsCheck()

void 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]".

Definition at line 890 of file CGExpr.cpp.

Referenced by emitPointerArithmetic().

◆ EmitBranch()

void 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.

Definition at line 456 of file CGStmt.cpp.

References Builder.

Referenced by EmitBlock(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), and EmitX86_64VAArgFromMemory().

◆ EmitBranchOnBoolExpr()

void CodeGenFunction::EmitBranchOnBoolExpr ( const Expr Cond,
llvm::BasicBlock *  TrueBlock,
llvm::BasicBlock *  FalseBlock,
uint64_t  TrueCount 
)

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.

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.

Definition at line 1473 of file CodeGenFunction.cpp.

References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CGM, ConstantFoldsToSimpleInteger(), createBasicBlock(), EmitBlock(), EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getCurrentProfileCount(), getLLVMContext(), getProfileCount(), clang::Expr::IgnoreParens(), incrementProfileCounter(), max(), and setCurrentProfileCount().

Referenced by EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), GetIntrinsic(), isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().

◆ EmitBranchThroughCleanup()

void CodeGenFunction::EmitBranchThroughCleanup ( JumpDest  Dest)

EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to.

Terminate the current block by emitting a branch which might leave the current cleanup-protected scope.

  • Dest.

The target scope may not yet be known, in which case this will require a fixup.

As a side-effect, this method clears the insertion point.

Definition at line 1034 of file CGCleanup.cpp.

References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().

Referenced by clang::CodeGen::CodeGenFunction::FinallyInfo::exit().

◆ EmitBreakStmt()

void CodeGenFunction::EmitBreakStmt ( const BreakStmt S)

Definition at line 1104 of file CGStmt.cpp.

◆ EmitBuiltinAvailable()

llvm::Value * CodeGenFunction::EmitBuiltinAvailable ( ArrayRef< llvm::Value *>  Args)

◆ EmitBuiltinExpr()

RValue CodeGenFunction::EmitBuiltinExpr ( const FunctionDecl FD,
unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue 
)

◆ EmitBuiltinNewDeleteCall()

RValue CodeGenFunction::EmitBuiltinNewDeleteCall ( const FunctionProtoType Type,
const Expr Arg,
bool  IsDelete 
)

Definition at line 1299 of file CGExprCXX.cpp.

References clang::FunctionProtoType::param_type_begin().

◆ emitBuiltinOSLogFormat()

RValue CodeGenFunction::emitBuiltinOSLogFormat ( const CallExpr E)

◆ emitByrefStructureInit()

void CodeGenFunction::emitByrefStructureInit ( const AutoVarEmission emission)

Initialize the structural components of a __block variable, i.e.

everything but the actual object.

Definition at line 2390 of file CGBlocks.cpp.

References clang::CodeGen::Address::getPointer().

Referenced by EmitAutoVarInit().

◆ EmitCall() [1/2]

RValue CodeGenFunction::EmitCall ( const CGFunctionInfo CallInfo,
const CGCallee Callee,
ReturnValueSlot  ReturnValue,
const CallArgList Args,
llvm::Instruction **  callOrInvoke = nullptr 
)

◆ EmitCall() [2/2]

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

Definition at line 4443 of file CGExpr.cpp.

◆ EmitCallAndReturnForThunk()

void CodeGenFunction::EmitCallAndReturnForThunk ( llvm::Constant *  Callee,
const ThunkInfo Thunk 
)

◆ EmitCallArg()

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

EmitCallArg - Emit a single call argument.

Definition at line 3475 of file CGCall.cpp.

◆ EmitCallArgs() [1/2]

template<typename T >
void clang::CodeGen::CodeGenFunction::EmitCallArgs ( CallArgList Args,
const T CallArgTypeInfo,
llvm::iterator_range< CallExpr::const_arg_iterator ArgRange,
AbstractCallee  AC = AbstractCallee(),
unsigned  ParamsToSkip = 0,
EvaluationOrder  Order = EvaluationOrder::Default 
)
inline

EmitCallArgs - Emit call arguments for a function.

Definition at line 3867 of file CodeGenFunction.h.

Referenced by commonEmitCXXMemberOrOperatorCall(), and emitCXXDestructor().

◆ EmitCallArgs() [2/2]

void CodeGenFunction::EmitCallArgs ( CallArgList Args,
ArrayRef< QualType ArgTypes,
llvm::iterator_range< CallExpr::const_arg_iterator ArgRange,
AbstractCallee  AC = AbstractCallee(),
unsigned  ParamsToSkip = 0,
EvaluationOrder  Order = EvaluationOrder::Default 
)

Definition at line 3358 of file CGCall.cpp.

◆ EmitCallee()

CGCallee CodeGenFunction::EmitCallee ( const Expr E)

Definition at line 4224 of file CGExpr.cpp.

◆ EmitCallExpr()

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

Definition at line 4177 of file CGExpr.cpp.

◆ EmitCallExprLValue()

LValue CodeGenFunction::EmitCallExprLValue ( const CallExpr E)

Definition at line 4321 of file CGExpr.cpp.

◆ EmitCallOrInvoke()

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

Emits a call or invoke instruction to the given function, depending on the current state of the EH stack.

Definition at line 3677 of file CGCall.cpp.

References getBundlesForFunclet().

Referenced by emitReduceScratchpadFunction(), and emitShuffleAndReduceFunction().

◆ EmitCapturedLocals()

void 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.

Definition at line 1549 of file CGException.cpp.

◆ EmitCapturedStmt()

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

Generate an outlined function for the body of a CapturedStmt, store any captured variables into the captured struct, and call the outlined function.

Definition at line 2235 of file CGStmt.cpp.

◆ EmitCaseStmt()

void CodeGenFunction::EmitCaseStmt ( const CaseStmt S)

Definition at line 1209 of file CGStmt.cpp.

◆ EmitCaseStmtRange()

void CodeGenFunction::EmitCaseStmtRange ( const CaseStmt S)

EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range.

If range is too big then emit "if" condition check.

Definition at line 1131 of file CGStmt.cpp.

◆ EmitCastLValue()

LValue CodeGenFunction::EmitCastLValue ( const CastExpr E)

EmitCastLValue - Casts are never lvalues unless that cast is to a reference type.

If the cast is to a reference, we can have the usual lvalue result, otherwise if a cast is needed by the code generator in an lvalue context, then it must mean that we need the address of an aggregate in order to access one of its members. This can happen for all the reasons that casts are permitted with aggregate result, including noop aggregate casts, and cast from scalar to union.

Definition at line 3998 of file CGExpr.cpp.

◆ EmitCastToVoidPtr()

llvm::Value * CodeGenFunction::EmitCastToVoidPtr ( llvm::Value value)

◆ EmitCfiCheckFail()

void CodeGenFunction::EmitCfiCheckFail ( )

◆ EmitCfiCheckStub()

void CodeGenFunction::EmitCfiCheckStub ( )

◆ EmitCfiSlowPathCheck()

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

◆ EmitCheck()

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

◆ EmitCheckedArgForBuiltin()

Value * 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.

Definition at line 648 of file CGBuiltin.cpp.

◆ EmitCheckedInBoundsGEP()

Value * CodeGenFunction::EmitCheckedInBoundsGEP ( 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.

Return the result of the given binary operation.

Definition at line 3939 of file CGExprScalar.cpp.

Referenced by emitArraySubscriptGEP(), emitPointerArithmetic(), and emitReduceFiniFunction().

◆ EmitCheckedLValue()

LValue 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.

Definition at line 1134 of file CGExpr.cpp.

Referenced by findPeephole(), and isBlockVarRef().

◆ EmitCheckSourceLocation()

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

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

Emit a representation of a SourceLocation for passing to a handler in a sanitizer runtime library.

The format for this data is:

struct SourceLocation {
const char *Filename;
int32_t Line, Column;
};

For an invalid SourceLocation, the Filename pointer is null.

Definition at line 2690 of file CGExpr.cpp.

References CGM, Filename, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::PresumedLoc::getFilename(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), INT_MIN, clang::PresumedLoc::isValid(), and Line.

Referenced by EmitNullabilityCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitVariablyModifiedType(), and GenerateCode().

◆ EmitCheckTypeDescriptor()

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

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

Emit a type description suitable for use by a runtime sanitizer library.

The format of a type descriptor is

{ i16 TypeKind, i16 TypeInfo }

followed by an array of i8 containing the type name. TypeKind is 0 for an integer, 1 for a floating point value, and -1 for anything else.

Definition at line 2609 of file CGExpr.cpp.

References CGM, getContext(), clang::CodeGen::CodeGenModule::getTypeDescriptorFromMap(), clang::ASTContext::getTypeSize(), getTypeSize(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), and clang::Type::isSignedIntegerType().

Referenced by EmitNullabilityCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), and EmitVariablyModifiedType().

◆ EmitCheckValue()

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

◆ EmitCoawaitExpr()

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

Definition at line 219 of file CGCoroutine.cpp.

◆ EmitCoawaitLValue()

LValue CodeGenFunction::EmitCoawaitLValue ( const CoawaitExpr E)

Definition at line 259 of file CGCoroutine.cpp.

◆ EmitCommonNeonBuiltinExpr()

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

◆ EmitComplexAssignmentLValue()

LValue CodeGenFunction::EmitComplexAssignmentLValue ( const BinaryOperator E)

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

Definition at line 1097 of file CGExprComplex.cpp.

References clang::BinaryOperator::getOpcode().

◆ EmitComplexCompoundAssignmentLValue()

LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue ( const CompoundAssignOperator E)

◆ EmitComplexExpr()

ComplexPairTy 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.

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

Definition at line 1067 of file CGExprComplex.cpp.

References getComplexType(), and clang::Expr::getType().

Referenced by EmitExprAsInit(), GetIntrinsic(), and ShouldNullCheckClassCastValue().

◆ EmitComplexExprIntoLValue()

void 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.

Definition at line 1076 of file CGExprComplex.cpp.

References getComplexType(), and clang::Expr::getType().

Referenced by EmitDeclInit(), and StoreAnyExprIntoOneUnit().

◆ EmitComplexPrePostIncDec()

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

Definition at line 919 of file CGExpr.cpp.

◆ EmitComplexToScalarConversion()

Value * 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.

Definition at line 3854 of file CGExprScalar.cpp.

References EmitScalarPrePostIncDec(), and clang::Type::isAnyComplexType().

Referenced by convertToScalarValue().

◆ EmitCompoundAssignmentLValue()

LValue CodeGenFunction::EmitCompoundAssignmentLValue ( const CompoundAssignOperator E)

◆ EmitCompoundLiteralLValue()

LValue CodeGenFunction::EmitCompoundLiteralLValue ( const CompoundLiteralExpr E)

Definition at line 3870 of file CGExpr.cpp.

◆ EmitCompoundStmt()

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

EmitCompoundStmt - Emit a compound statement {..} node.

If GetLast is true, this captures the expression result of the last sub-statement and returns it (for use by the statement expression extension).

Definition at line 363 of file CGStmt.cpp.

Referenced by ShouldNullCheckClassCastValue().

◆ EmitCompoundStmtWithoutScope()

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

Definition at line 375 of file CGStmt.cpp.

Referenced by GenerateObjCMethod().

◆ EmitConditionalOperatorLValue()

LValue CodeGenFunction::EmitConditionalOperatorLValue ( const AbstractConditionalOperator E)

◆ EmitConstructorBody()

void CodeGenFunction::EmitConstructorBody ( FunctionArgList Args)

EmitConstructorBody - Emits the body of the current constructor.

Definition at line 805 of file CGClass.cpp.

References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::Ctor_Base, clang::Ctor_Complete, EmitLValueForAnyFieldInitialization(), EmitLValueForFieldInitialization(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CXXCtorInitializer::getAnyMember(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::ASTContext::getCharWidth(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::FieldDecl::getFieldIndex(), clang::CXXCtorInitializer::getInit(), clang::ASTContext::getLangOpts(), getLangOpts(), getLLVMContext(), clang::Decl::getLocEnd(), clang::CXXCtorInitializer::getMember(), clang::CXXMethodDecl::getParent(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::CodeGen::CGCXXABI::getSrcArgforCopyCtor(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), getTypes(), clang::ASTContext::getTypeSize(), clang::Qualifiers::hasObjCLifetime(), clang::Qualifiers::hasVolatile(), clang::CodeGen::LValue::isBitField(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::QualType::isDestructedType(), isMemcpyEquivalentSpecialMember(), clang::Type::isReferenceType(), clang::QualType::isTriviallyCopyableType(), LoadCXXThisAddress(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), needsEHCleanup(), clang::LangOptions::NonGC, pushEHDestroy(), SanOpts, clang::SanitizerSet::set(), clang::CodeGen::CGBitFieldInfo::StorageOffset, clang::ASTContext::toBits(), clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Type.

Referenced by GenerateCode().

◆ EmitContinueStmt()

void CodeGenFunction::EmitContinueStmt ( const ContinueStmt S)

Definition at line 1116 of file CGStmt.cpp.

◆ EmitCoreturnStmt()

void CodeGenFunction::EmitCoreturnStmt ( const CoreturnStmt S)

Definition at line 233 of file CGCoroutine.cpp.

◆ EmitCoroutineBody()

void CodeGenFunction::EmitCoroutineBody ( const CoroutineBodyStmt S)

Definition at line 501 of file CGCoroutine.cpp.

◆ EmitCoroutineIntrinsic()

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

Definition at line 633 of file CGCoroutine.cpp.

◆ EmitCoyieldExpr()

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

Definition at line 226 of file CGCoroutine.cpp.

◆ EmitCoyieldLValue()

LValue CodeGenFunction::EmitCoyieldLValue ( const CoyieldExpr E)

Definition at line 269 of file CGCoroutine.cpp.

◆ EmitCtorPrologue()

void CodeGenFunction::EmitCtorPrologue ( const CXXConstructorDecl CD,
CXXCtorType  CtorType,
FunctionArgList Args 
)

EmitCtorPrologue - This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor.

Definition at line 1241 of file CGClass.cpp.

References clang::CXXMethodDecl::getParent(), clang::CXXConstructorDecl::init_begin(), and clang::CXXConstructorDecl::isDelegatingConstructor().

◆ EmitCUDAKernelCallExpr()

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

Definition at line 463 of file CGExprCXX.cpp.

◆ EmitCXXAggrConstructorCall() [1/2]

void CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl ctor,
const ArrayType arrayType,
Address  arrayBegin,
const CXXConstructExpr E,
bool  zeroInitialize = false 
)

EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.

Parameters
ctorthe constructor to call for each element
arrayTypethe type of the array to initialize
arrayBeginan arrayType*
zeroInitializetrue if each element should be zero-initialized before it is constructed

Definition at line 1859 of file CGClass.cpp.

◆ EmitCXXAggrConstructorCall() [2/2]

void CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl ctor,
llvm::Value numElements,
Address  arrayBase,
const CXXConstructExpr E,
bool  zeroInitialize = false 
)

EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.

Parameters
ctorthe constructor to call for each element
numElementsthe number of elements in the array; may be zero
arrayBasea T*, where T is the type constructed by ctor
zeroInitializetrue if each element should be zero-initialized before it is constructed

Definition at line 1878 of file CGClass.cpp.

◆ EmitCXXBindTemporaryLValue()

LValue CodeGenFunction::EmitCXXBindTemporaryLValue ( const CXXBindTemporaryExpr E)

Definition at line 4364 of file CGExpr.cpp.

◆ EmitCXXConstructExpr()

void CodeGenFunction::EmitCXXConstructExpr ( const CXXConstructExpr E,
AggValueSlot  Dest 
)

Definition at line 556 of file CGExprCXX.cpp.

Referenced by isBlockVarRef().

◆ EmitCXXConstructLValue()

LValue CodeGenFunction::EmitCXXConstructLValue ( const CXXConstructExpr E)

Definition at line 4340 of file CGExpr.cpp.

◆ EmitCXXConstructorCall() [1/2]

void CodeGenFunction::EmitCXXConstructorCall ( const CXXConstructorDecl D,
CXXCtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This,
const CXXConstructExpr E 
)

Definition at line 1988 of file CGClass.cpp.

◆ EmitCXXConstructorCall() [2/2]

void CodeGenFunction::EmitCXXConstructorCall ( const CXXConstructorDecl D,
CXXCtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This,
CallArgList Args 
)

◆ EmitCXXDeleteExpr()

void CodeGenFunction::EmitCXXDeleteExpr ( const CXXDeleteExpr E)

Definition at line 1964 of file CGExprCXX.cpp.

◆ EmitCXXDestructorCall() [1/2]

void CodeGenFunction::EmitCXXDestructorCall ( const CXXDestructorDecl D,
CXXDtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This 
)

◆ EmitCXXDestructorCall() [2/2]

RValue CodeGenFunction::EmitCXXDestructorCall ( const CXXDestructorDecl DD,
const CGCallee Callee,
llvm::Value This,
llvm::Value ImplicitParam,
QualType  ImplicitParamTy,
const CallExpr E,
StructorType  Type 
)

Definition at line 95 of file CGExprCXX.cpp.

References commonEmitCXXMemberOrOperatorCall().

◆ EmitCXXForRangeStmt()

void CodeGenFunction::EmitCXXForRangeStmt ( const CXXForRangeStmt S,
ArrayRef< const Attr *>  Attrs = None 
)

Definition at line 919 of file CGStmt.cpp.

◆ EmitCXXGlobalVarDeclInit()

void CodeGenFunction::EmitCXXGlobalVarDeclInit ( const VarDecl D,
llvm::Constant *  DeclPtr,
bool  PerformInit 
)

◆ EmitCXXGuardedInit()

void CodeGenFunction::EmitCXXGuardedInit ( const VarDecl D,
llvm::GlobalVariable *  DeclPtr,
bool  PerformInit 
)

Emit code in this function to perform a guarded variable initialization.

Guarded initializations are used when it's not possible to prove that an initialization will be done exactly once, e.g. with a static local variable or a static data member of a class template.

Definition at line 249 of file CGDeclCXX.cpp.

References CGM, clang::CodeGen::CGCXXABI::EmitGuardedInit(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::Decl::getLocation().

Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().

◆ EmitCXXGuardedInitBranch()

void CodeGenFunction::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.

Definition at line 263 of file CGDeclCXX.cpp.

References Builder, CGM, clang::CodeGen::CodeGenModule::getLLVMContext(), clang::VarDecl::getTLSKind(), clang::VarDecl::isLocalVarDecl(), TlsGuard, and VariableGuard.

Referenced by GenerateCXXGlobalInitFunc().

◆ EmitCXXMemberCallExpr()

RValue CodeGenFunction::EmitCXXMemberCallExpr ( const CXXMemberCallExpr E,
ReturnValueSlot  ReturnValue 
)

◆ EmitCXXMemberDataPointerAddress()

Address CodeGenFunction::EmitCXXMemberDataPointerAddress ( const Expr E,
Address  base,
llvm::Value memberPtr,
const MemberPointerType memberPtrType,
LValueBaseInfo BaseInfo = nullptr,
TBAAAccessInfo TBAAInfo = nullptr 
)

Emit the address of a field using a member data pointer.

Parameters
EOnly used for emergency diagnostics

Definition at line 129 of file CGClass.cpp.

◆ EmitCXXMemberOrOperatorCall()

RValue CodeGenFunction::EmitCXXMemberOrOperatorCall ( const CXXMethodDecl Method,
const CGCallee Callee,
ReturnValueSlot  ReturnValue,
llvm::Value This,
llvm::Value ImplicitParam,
QualType  ImplicitParamTy,
const CallExpr E,
CallArgList RtlArgs 
)

◆ EmitCXXMemberOrOperatorMemberCallExpr()

RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr ( const CallExpr CE,
const CXXMethodDecl MD,
ReturnValueSlot  ReturnValue,
bool  HasQualifier,
NestedNameSpecifier Qualifier,
bool  IsArrow,
const Expr Base 
)

◆ EmitCXXMemberPointerCallExpr()

RValue CodeGenFunction::EmitCXXMemberPointerCallExpr ( const CXXMemberCallExpr E,
ReturnValueSlot  ReturnValue 
)

Definition at line 400 of file CGExprCXX.cpp.

◆ EmitCXXNewExpr()

llvm::Value * CodeGenFunction::EmitCXXNewExpr ( const CXXNewExpr E)

Definition at line 1521 of file CGExprCXX.cpp.

◆ EmitCXXOperatorMemberCallExpr()

RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr ( const CXXOperatorCallExpr E,
const CXXMethodDecl MD,
ReturnValueSlot  ReturnValue 
)

Definition at line 453 of file CGExprCXX.cpp.

◆ EmitCXXPseudoDestructorExpr()

RValue CodeGenFunction::EmitCXXPseudoDestructorExpr ( const CXXPseudoDestructorExpr E)

Definition at line 106 of file CGExprCXX.cpp.

◆ EmitCXXTemporary()

void CodeGenFunction::EmitCXXTemporary ( const CXXTemporary Temporary,
QualType  TempType,
Address  Ptr 
)

Emits all the code to cause the given temporary to be cleaned up.

Definition at line 1260 of file CGCleanup.cpp.

References clang::CodeGen::NormalAndEHCleanup.

Referenced by isBlockVarRef().

◆ EmitCXXThrowExpr()

void CodeGenFunction::EmitCXXThrowExpr ( const CXXThrowExpr E,
bool  KeepInsertionPoint = true 
)

Definition at line 412 of file CGException.cpp.

Referenced by EmitBranchOnBoolExpr(), and EmitLValueOrThrowExpression().

◆ EmitCXXTryStmt()

void CodeGenFunction::EmitCXXTryStmt ( const CXXTryStmt S)

Definition at line 545 of file CGException.cpp.

◆ EmitCXXTypeidExpr()

llvm::Value * CodeGenFunction::EmitCXXTypeidExpr ( const CXXTypeidExpr E)

Definition at line 2085 of file CGExprCXX.cpp.

◆ EmitCXXTypeidLValue()

LValue CodeGenFunction::EmitCXXTypeidLValue ( const CXXTypeidExpr E)

Definition at line 4349 of file CGExpr.cpp.

◆ EmitCXXUuidofExpr()

Address CodeGenFunction::EmitCXXUuidofExpr ( const CXXUuidofExpr E)

Definition at line 4353 of file CGExpr.cpp.

◆ EmitCXXUuidofLValue()

LValue CodeGenFunction::EmitCXXUuidofLValue ( const CXXUuidofExpr E)

Definition at line 4358 of file CGExpr.cpp.

◆ EmitDecl()

void CodeGenFunction::EmitDecl ( const Decl D)

EmitDecl - Emit a declaration.

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

Definition at line 41 of file CGDecl.cpp.

References CGM, clang::CodeGen::CodeGenModule::EmitOMPDeclareReduction(), EmitVarDecl(), EmitVariablyModifiedType(), getDebugInfo(), clang::Decl::getKind(), clang::TypedefNameDecl::getUnderlyingType(), clang::VarDecl::isLocalVarDecl(), and Label.

◆ EmitDeclRefExprDbgValue()

void CodeGenFunction::EmitDeclRefExprDbgValue ( const DeclRefExpr E,
const APValue Init 
)

Definition at line 2106 of file CodeGenFunction.cpp.

Referenced by tryEmitAsConstant().

◆ EmitDeclRefLValue()

LValue CodeGenFunction::EmitDeclRefLValue ( const DeclRefExpr E)

Definition at line 2344 of file CGExpr.cpp.

Referenced by LoadObjCSelf().

◆ EmitDeclStmt()

void CodeGenFunction::EmitDeclStmt ( const DeclStmt S)

Definition at line 1094 of file CGStmt.cpp.

◆ EmitDefaultStmt()

void CodeGenFunction::EmitDefaultStmt ( const DefaultStmt S)

Definition at line 1292 of file CGStmt.cpp.

◆ EmitDelegateCallArg()

void CodeGenFunction::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.

Produce a r-value suitable for passing the given parameter.

Definition at line 3022 of file CGCall.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::RValue::get(), clang::ValueDecl::getType(), isInAllocaArgument(), clang::Type::isReferenceType(), and clang::ast_matchers::type.

◆ EmitDelegateCXXConstructorCall()

void CodeGenFunction::EmitDelegateCXXConstructorCall ( const CXXConstructorDecl Ctor,
CXXCtorType  CtorType,
const FunctionArgList Args,
SourceLocation  Loc 
)

Definition at line 2266 of file CGClass.cpp.

◆ EmitDelegatingCXXConstructorCall()

void CodeGenFunction::EmitDelegatingCXXConstructorCall ( const CXXConstructorDecl Ctor,
const FunctionArgList Args 
)