clang  3.9.0
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 <CodeGenFunction.h>

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

Classes

class  AutoVarEmission
 
class  CallLifetimeEnd
 
class  CGCapturedStmtInfo
 API for captured statement code generation. More...
 
class  CGCapturedStmtRAII
 RAII for correct setting/restoring of CapturedStmtInfo. More...
 
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  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
}
 Situations in which we might emit a check for the suitability of a pointer or glvalue. More...
 
typedef std::pair< llvm::Value
*, llvm::Value * > 
ComplexPairTy
 
typedef llvm::DenseMap< const
Decl *, Address
DeclMapTy
 
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...
 
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)
 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)
 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)
 Increment the profiler's counter for the given statement. 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 ()
 
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 *)
 Emit a block literal expression in the current function. More...
 
llvm::ValueEmitBlockLiteral (const CGBlockInfo &Info)
 
llvm::Function * GenerateBlockFunction (GlobalDecl GD, const CGBlockInfo &Info, const DeclMapTy &ldm, bool IsLambdaConversionToBlock)
 
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 EmitLambdaToBlockPointerBody (FunctionArgList &Args)
 
void EmitLambdaBlockInvokeBody ()
 
void EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD)
 
void EmitLambdaStaticInvokeFunction (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::Value *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, ArrayRef< VarDecl * > ArrayIndexes)
 
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...
 
bool CanDevirtualizeMemberFunctionCall (const Expr *Base, const CXXMethodDecl *MD)
 CanDevirtualizeMemberFunctionCalls - Checks whether virtual calls on given expr can be devirtualized. 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...
 
void EmitFunctionInstrumentation (const char *Fn)
 EmitFunctionInstrumentation - Emit LLVM code to call the specified instrumentation function with the current function and the call site, if function instrumentation is enabled. More...
 
void EmitMCountInstrumentation ()
 EmitMCountInstrumentation - Emit call to .mcount. 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 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 AlignSource=AlignmentSource::Type)
 
LValue MakeAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource AlignSource=AlignmentSource::Type)
 
LValue MakeNaturalAlignPointeeAddrLValue (llvm::Value *V, QualType T)
 Given a value of type T* that may not be to a complete object, construct an l-value with the natural pointee alignment of T. More...
 
LValue MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T)
 
CharUnits getNaturalTypeAlignment (QualType T, AlignmentSource *Source=nullptr, bool forPointeeType=false)
 
CharUnits getNaturalPointeeTypeAlignment (QualType T, AlignmentSource *Source=nullptr)
 
Address EmitLoadOfReference (Address Ref, const ReferenceType *RefTy, AlignmentSource *Source=nullptr)
 
LValue EmitLoadOfReferenceLValue (Address Ref, const ReferenceType *RefTy)
 
Address EmitLoadOfPointer (Address Ptr, const PointerType *PtrTy, AlignmentSource *Source=nullptr)
 
LValue EmitLoadOfPointerLValue (Address Ptr, const PointerType *PtrTy)
 
llvm::AllocaInst * CreateTempAlloca (llvm::Type *Ty, const Twine &Name="tmp")
 CreateTempAlloca - This creates a alloca and inserts it into the entry block. More...
 
Address CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp")
 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")
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignment. More...
 
Address CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp")
 
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 - Similary 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::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
*, QualType
getVLASize (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
*, QualType
getVLASize (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)
 
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(), bool SkipNullCheck=false)
 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)
 
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)
 
void EmitScalarInit (llvm::Value *init, LValue lvalue)
 EmitScalarInit - Initialize the given lvalue with the given object. More...
 
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 EmitStopPoint (const Stmt *S)
 EmitStopPoint - Emit a debug stoppoint if we are emitting debug info. More...
 
void EmitStmt (const Stmt *S)
 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 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)
 
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)
 Emit final update of reduction values to original variables at the end of the directive. More...
 
void 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 EmitOMPDistributeLoop (const OMPDistributeDirective &S)
 
void EmitOMPDistributeParallelForDirective (const OMPDistributeParallelForDirective &S)
 
void EmitOMPDistributeParallelForSimdDirective (const OMPDistributeParallelForSimdDirective &S)
 
void EmitOMPDistributeSimdDirective (const OMPDistributeSimdDirective &S)
 
void EmitOMPTargetParallelForSimdDirective (const OMPTargetParallelForSimdDirective &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...
 
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...
 
llvm::ValueEmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, AlignmentSource AlignSource=AlignmentSource::Type, llvm::MDNode *TBAAInfo=nullptr, QualType TBAABaseTy=QualType(), uint64_t TBAAOffset=0, 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 (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 AlignSource=AlignmentSource::Type, llvm::MDNode *TBAAInfo=nullptr, bool isInit=false, QualType TBAABaseTy=QualType(), uint64_t TBAAOffset=0, 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, 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)
 
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, AlignmentSource *AlignSource=nullptr)
 
ConstantEmission tryEmitAsConstant (DeclRefExpr *refExpr)
 Try to emit a reference to the given value without producing it as an l-value. More...
 
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, llvm::Constant *Init)
 
RValue EmitCall (const CGFunctionInfo &FnInfo, llvm::Value *Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, CGCalleeInfo CalleeInfo=CGCalleeInfo(), 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, llvm::Value *Callee, const CallExpr *E, ReturnValueSlot ReturnValue, CGCalleeInfo CalleeInfo=CGCalleeInfo(), llvm::Value *Chain=nullptr)
 
RValue EmitCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue=ReturnValueSlot())
 
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...
 
llvm::ValueBuildAppleKextVirtualCall (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...
 
llvm::ValueBuildAppleKextVirtualDestructorCall (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 *MD, llvm::Value *Callee, ReturnValueSlot ReturnValue, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E)
 
RValue EmitCXXDestructorCall (const CXXDestructorDecl *DD, llvm::Value *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, AlignmentSource *AlignSource=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 EmitCUDAKernelCallExpr (const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue)
 
RValue EmitCUDADevicePrintfCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue)
 
RValue EmitBuiltinExpr (const FunctionDecl *FD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 
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::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 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::WeakVH, 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...
 
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, StringRef CheckName, 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 EmitCfiCheckFail ()
 Emit a cross-DSO CFI failure handling function. More...
 
void EmitNonNullArgCheck (RValue RV, QualType ArgType, SourceLocation ArgLoc, const FunctionDecl *FD, 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, const FunctionDecl *CalleeDecl=nullptr, unsigned ParamsToSkip=0)
 EmitCallArgs - Emit call arguments for a function. More...
 
void EmitCallArgs (CallArgList &Args, ArrayRef< QualType > ArgTypes, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, const FunctionDecl *CalleeDecl=nullptr, unsigned ParamsToSkip=0)
 
Address EmitPointerWithAlignment (const Expr *Addr, AlignmentSource *Source=nullptr)
 EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee. 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
 

Static Public Member Functions

static void destroyBlockInfos (CGBlockInfo *info)
 Destroy a chain of block layouts. More...
 
static TypeEvaluationKind getEvaluationKind (QualType T)
 hasAggregateLLVMType - Return true if the specified AST type will map into an aggregate LLVM type or is void. 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 ShouldNullCheckClassCastValue (const CastExpr *Cast)
 
static std::pair
< llvm::Function
*, llvm::Constant * > 
EmitOMPTargetDirectiveOutlinedFunction (CodeGenModule &CGM, const OMPTargetDirective &S, StringRef ParentName, bool IsOffloadEntry)
 Emit outlined function for the target 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 isObjCMethodWithTypeParams (const ObjCMethodDecl *method)
 
template<typename T >
static bool isObjCMethodWithTypeParams (const T *)
 

Public Attributes

CodeGenModuleCGM
 
const TargetInfoTarget
 
LoopInfoStack LoopStack
 
CGBuilderTy Builder
 
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
 
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 {
   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
 
   unsigned char   SizeSizeInBytes
 
   unsigned char   SizeAlignInBytes
 
}; 
 The size and alignment of a pointer into the generic address space. More...
 
llvm::CallingConv::ID RuntimeCC
 
llvm::CallingConv::ID BuiltinCC
 

Static Public Attributes

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

Friends

class CGCXXABI
 

Detailed Description

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

Definition at line 105 of file CodeGenFunction.h.

Member Typedef Documentation

Definition at line 139 of file CodeGenFunction.h.

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

Definition at line 583 of file CodeGenFunction.h.

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

Definition at line 1245 of file CodeGenFunction.h.

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

Definition at line 2112 of file CodeGenFunction.h.

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

Definition at line 2462 of file CodeGenFunction.h.

Definition at line 1453 of file CodeGenFunction.h.

Definition at line 1451 of file CodeGenFunction.h.

Member Enumeration Documentation

Enumerator
CFITCK_VCall 
CFITCK_NVCall 
CFITCK_DerivedCast 
CFITCK_UnrelatedCast 
CFITCK_ICall 

Definition at line 1469 of file CodeGenFunction.h.

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.

Definition at line 2036 of file CodeGenFunction.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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 1181 of file CGCleanup.cpp.

References clang::CodeGen::EHCleanupScope(), ForActivation, and SetupCleanupBlockActivation().

Referenced by EmitBlockLiteral(), and pushCleanupAfterFullExpr().

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 292 of file CGDecl.cpp.

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

Referenced by EmitStaticVarDecl().

llvm::Value * 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 289 of file CGCXX.cpp.

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

Referenced by EmitCXXMemberOrOperatorMemberCallExpr().

llvm::Value * 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 310 of file CGCXX.cpp.

References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), BuildAppleKextVirtualCall(), CGM, clang::CodeGen::Complete, clang::Dtor_Base, clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CodeGen::Type.

Referenced by BuildAppleKextVirtualCall().

void CodeGenFunction::BuildBlockRelease ( llvm::Value DeclPtr,
BlockFieldFlags  flags 
)
QualType CodeGenFunction::BuildFunctionArgList ( GlobalDecl  GD,
FunctionArgList Args 
)
llvm::Value * CodeGenFunction::BuildVector ( ArrayRef< llvm::Value * >  Ops)

Definition at line 6542 of file CGBuiltin.cpp.

References Builder.

Referenced by EmitX86BuiltinExpr().

bool CodeGenFunction::CanDevirtualizeMemberFunctionCall ( const Expr Base,
const CXXMethodDecl MD 
)

CanDevirtualizeMemberFunctionCalls - Checks whether virtual calls on given expr can be devirtualized.

Definition at line 2834 of file CGClass.cpp.

References clang::Expr::getBestDynamicClassType(), getContext(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::CXXMethodDecl::getParent(), and skipNoOpCastsAndParens().

Referenced by EmitCXXMemberOrOperatorMemberCallExpr().

void CodeGenFunction::checkTargetFeatures ( const CallExpr E,
const FunctionDecl TargetDecl 
)
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 1150 of file CodeGenFunction.cpp.

Referenced by EmitBranchOnBoolExpr(), EmitIfStmt(), EmitOMPDistributeLoop(), emitOMPIfClause(), EmitOMPSimdDirective(), EmitOMPTargetDirective(), EmitOMPTaskBasedDirective(), and EmitSwitchStmt().

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 1164 of file CodeGenFunction.cpp.

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

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 1125 of file CodeGenFunction.cpp.

Referenced by CollectStatementsForCase().

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 1093 of file CodeGenFunction.cpp.

Referenced by CollectStatementsForCase(), ConstantFoldsToSimpleInteger(), EmitAutoVarInit(), EmitIfStmt(), EmitStmt(), and FindCaseStatementsForValue().

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

Given the address of a temporary variable, produce an r-value of its type.

Definition at line 4156 of file CGExpr.cpp.

References clang::CodeGen::LValue::asAggregateRValue(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.

Referenced by EmitAtomicExpr(), EmitCall(), and EmitDelegateCallArg().

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

Definition at line 1564 of file CodeGenFunction.h.

References ConvertType(), and getContext().

llvm::Type * CodeGenFunction::ConvertTypeForMem ( QualType  T)
AggValueSlot clang::CodeGen::CodeGenFunction::CreateAggTemp ( QualType  T,
const Twine &  Name = "tmp" 
)
inline
llvm::Constant * CodeGenFunction::createAtExitStub ( const VarDecl VD,
llvm::Constant *  dtor,
llvm::Constant *  addr 
)
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::createBasicBlock ( const Twine &  name = "",
llvm::Function *  parent = nullptr,
llvm::BasicBlock *  before = nullptr 
)
inline

createBasicBlock - Create an LLVM basic block.

Definition at line 1588 of file CodeGenFunction.h.

References clang::Create(), and getLLVMContext().

Referenced by CreateNormalEntry(), EmitAggMemberInitializer(), emitArrayDestroy(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallOrInvoke(), clang::CodeGen::emitCancellationPointCall(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), EmitCleanup(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryFooter(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryHeader(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLandingPad(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), emitOMPIfClause(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPSimdDirective(), emitPostUpdateForReductionClause(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitVTablePtrCheckForCast(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterCXXTryStmt(), EnterSEHTryStmt(), ExitCXXTryStmt(), ExitSEHTryStmt(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getEHDispatchBlock(), getEHResumeBlock(), GetIndirectGotoBlock(), getJumpDestForLabel(), getJumpDestInCurrentScope(), getMSVCDispatchBlock(), getTerminateHandler(), getTerminateLandingPad(), getUnreachableBlock(), PerformReturnAdjustment(), and StartFunction().

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 78 of file CGExpr.cpp.

References CGM, CreateTempAlloca(), clang::CharUnits::fromQuantity(), and clang::CodeGen::CodeGenModule::getDataLayout().

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 93 of file CGExpr.cpp.

References ConvertType(), CreateTempAlloca(), getContext(), and clang::ASTContext::getTypeAlignInChars().

Referenced by EmitInlinedInheritingCXXConstructorCall(), and StartFunction().

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

Definition at line 103 of file CGExpr.cpp.

References ConvertTypeForMem(), and CreateTempAlloca().

llvm::AllocaInst * CodeGenFunction::CreateTempAlloca ( llvm::Type Ty,
const Twine &  Name = "tmp" 
)
Address CodeGenFunction::CreateTempAlloca ( llvm::Type Ty,
CharUnits  Align,
const Twine &  Name = "tmp" 
)

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

Definition at line 60 of file CGExpr.cpp.

References CreateTempAlloca(), and clang::CharUnits::getQuantity().

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

Definition at line 1236 of file CodeGenFunction.h.

References CurSEHParent.

Referenced by EmitCall(), and getInvokeDestImpl().

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 1193 of file CGCleanup.cpp.

References Builder, clang::CodeGen::EHCleanupScope(), ForDeactivation, and SetupCleanupBlockActivation().

Referenced by deactivateArgCleanupsBeforeCall(), EmitAnyExprToExn(), EmitCXXNewExpr(), EmitNewArrayInitializer(), and pushCleanupAfterFullExpr().

void CodeGenFunction::destroyBlockInfos ( CGBlockInfo info)
static

Destroy a chain of block layouts.

Definition at line 669 of file CGBlocks.cpp.

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

Referenced by ~CodeGenFunction().

void clang::CodeGen::CodeGenFunction::disableDebugInfo ( )
inline
Value * CodeGenFunction::EmitAArch64BuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

Definition at line 4785 of file CGBuiltin.cpp.

References Builder, ceil, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateDefaultAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateDefaultAlignedStore(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenTypeCache::DoubleTy, EmitAArch64CompareBuiltinExpr(), EmitAArch64TblBuiltinExpr(), EmitAnyExprToMem(), EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNeonSplat(), EmitNounwindRuntimeCall(), EmitScalarExpr(), EmitSpecialRegisterBuiltin(), findNeonIntrinsicInMap(), clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::CodeGen::CodeGenTypeCache::FloatTy, floor, fma, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::ASTContext::GetBuiltinType(), clang::CallExpr::getCallReturnType(), getContext(), clang::CallExpr::getDirectCallee(), clang::NeonTypeFlags::getEltType(), GetFloatNeonType(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSize(), getTypeSize(), getValue(), ID, clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::invalid(), clang::Expr::isIntegerConstantExpr(), clang::NeonTypeFlags::isPoly(), clang::NeonTypeFlags::isQuad(), clang::NeonTypeFlags::isUnsigned(), min(), nearbyint, P, prefetch(), rint, rotate(), round, clang::CodeGen::CodeGenTypeCache::SizeTy, sqrt, trunc, clang::CodeGen::Type, vectorWrapScalar16(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.

Referenced by EmitTargetArchBuiltinExpr().

Value * CodeGenFunction::EmitAArch64CompareBuiltinExpr ( llvm::Value Op,
llvm::Type Ty,
const llvm::CmpInst::Predicate  Fp,
const llvm::CmpInst::Predicate  Ip,
const llvm::Twine &  Name = "" 
)
Address CodeGenFunction::emitAddrOfImagComponent ( Address  complex,
QualType  complexType 
)
Address CodeGenFunction::emitAddrOfRealComponent ( Address  complex,
QualType  complexType 
)
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 1437 of file CGExprAgg.cpp.

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

Referenced by EmitAggExprToLValue(), EmitAggMemberInitializer(), EmitAnyExpr(), EmitAnyExprToMem(), EmitAtomicInit(), EmitBaseInitializer(), EmitBlockLiteral(), EmitCallArg(), EmitCompoundStmtWithoutScope(), EmitCXXConstructExpr(), EmitDeclInit(), EmitDelegatingCXXConstructorCall(), EmitExprAsInit(), EmitMaterializeTemporaryExpr(), emitPseudoObjectExpr(), EmitReturnStmt(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), and StoreAnyExprIntoOneUnit().

LValue CodeGenFunction::EmitAggExprToLValue ( const Expr E)
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 1795 of file CodeGenFunction.h.

References EmitAggregateCopy(), and hasVolatileMember().

Referenced by EmitCXXMemberOrOperatorMemberCallExpr(), EmitOMPCopy(), EmitOMPFirstprivateClause(), and emitPrivatesInit().

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

EmitAggregateCopy - Emit an aggregate copy.

Parameters
isVolatile- True iff either the source or the destination is volatile.
isAssignment- If false, allow padding to be copied. This often yields more efficient.

Definition at line 1459 of file CGExprAgg.cpp.

References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), emitArrayLength(), clang::CodeGen::CGObjCRuntime::EmitGCMemmoveCollectable(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getContext(), clang::RecordType::getDecl(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CodeGenModule::getTBAAStructInfo(), clang::ASTContext::getTypeInfoDataSizeInChars(), clang::ASTContext::getTypeInfoInChars(), clang::RecordDecl::hasObjectMember(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::Type::isAnyComplexType(), clang::Type::isArrayType(), clang::CXXRecordDecl::isEmpty(), clang::TagDecl::isUnion(), clang::LangOptions::NonGC, and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by EmitAggregateAssign(), EmitAggregateCopyCtor(), EmitCall(), EmitCallArg(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitMemberInitializer(), clang::CodeGen::emitTaskInit(), generateObjCGetterBody(), and InitCatchParam().

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

Definition at line 1801 of file CodeGenFunction.h.

References EmitAggregateCopy().

Referenced by EmitCXXConstructorCall().

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

Definition at line 2088 of file CodeGenFunction.h.

References Builder, CGM, and clang::CodeGen::CodeGenModule::getDataLayout().

Referenced by emitAlignedClause(), and EmitCall().

Value * CodeGenFunction::EmitAMDGPUBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
llvm::Value * CodeGenFunction::EmitAnnotationCall ( llvm::Value AnnotationFn,
llvm::Value AnnotatedVal,
StringRef  AnnotationStr,
SourceLocation  Location 
)
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 140 of file CGExpr.cpp.

References clang::CodeGen::AggValueSlot::asRValue(), CreateAggTemp(), EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitAnyExprToTemp(), EmitIgnoredExpr(), EmitObjCBoxedExpr(), EmitOMPAtomicCaptureExpr(), EmitOMPAtomicUpdateExpr(), EmitOMPAtomicWriteExpr(), emitPseudoObjectExpr(), EmitReturnStmt(), emitSimdlenSafelenClause(), and GenerateObjCAtomicGetterCopyHelperFunction().

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

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

Definition at line 159 of file CGExpr.cpp.

References CreateAggTemp(), EmitAnyExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CodeGen::AggValueSlot::ignored().

Referenced by EmitCallArg().

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

Autorelease the given object.

call i8* @objc_autorelease(i8* value)

Definition at line 2154 of file CGObjC.cpp.

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

Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().

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

Autorelease the given object.

call i8* @objc_autoreleaseReturnValue(i8* value)

Definition at line 2163 of file CGObjC.cpp.

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

Referenced by emitAutoreleaseOfResult().

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 2281 of file CGObjC.cpp.

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

Referenced by GenerateCopyHelperFunction(), and tryEmitARCCopyWeakInit().

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 2079 of file CGObjC.cpp.

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

Referenced by EmitObjectDelete(), and GenerateDestroyHelperFunction().

void CodeGenFunction::EmitARCDestroyWeak ( Address  addr)
llvm::Value * CodeGenFunction::EmitARCExtendBlockObject ( const Expr expr)
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 2237 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(), and InitCatchParam().

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 1783 of file CGObjC.cpp.

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

Referenced by EmitObjCCollectionLiteral(), and emitWriteback().

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

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

Definition at line 2210 of file CGObjC.cpp.

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

Referenced by generateObjCGetterBody().

llvm::Value * CodeGenFunction::EmitARCLoadWeakRetained ( Address  addr)
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 2272 of file CGObjC.cpp.

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

Referenced by tryEmitARCCopyWeakInit().

llvm::Value * CodeGenFunction::EmitARCReclaimReturnedObject ( const Expr e,
bool  allowUnsafeClaim 
)
void CodeGenFunction::EmitARCRelease ( llvm::Value value,
ARCPreciseLifetime_t  precise 
)
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 1931 of file CGObjC.cpp.

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

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

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 2185 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(), EmitObjCExtendObjectLifetime(), EmitObjCMessageExpr(), and EmitScalarInit().

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 2023 of file CGObjC.cpp.

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

Referenced by emitARCRetainCallResult().

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 2202 of file CGObjC.cpp.

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

Referenced by EmitARCRetainAutorelease().

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 2173 of file CGObjC.cpp.

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

Referenced by tryEmitFusedAutoreleaseOfResult().

llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr ( const Expr expr)
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 1952 of file CGObjC.cpp.

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

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

llvm::Value * CodeGenFunction::EmitARCRetainNonBlock ( llvm::Value value)
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 2920 of file CGObjC.cpp.

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

Referenced by clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitObjCForCollectionStmt(), and EmitScalarInit().

std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreAutoreleasing ( const BinaryOperator e)
llvm::Value * CodeGenFunction::EmitARCStoreStrong ( LValue  dst,
llvm::Value newValue,
bool  ignored 
)
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreStrong ( const BinaryOperator e,
bool  ignored 
)
llvm::Value * CodeGenFunction::EmitARCStoreStrongCall ( Address  addr,
llvm::Value value,
bool  ignored 
)
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreUnsafeUnretained ( const BinaryOperator e,
bool  ignored 
)
llvm::Value * CodeGenFunction::EmitARCStoreWeak ( Address  addr,
llvm::Value value,
bool  ignored 
)

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

Definition at line 2225 of file CGObjC.cpp.

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

Referenced by EmitScalarInit().

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 2038 of file CGObjC.cpp.

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

Referenced by emitARCUnsafeClaimCallResult().

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 3047 of file CGObjC.cpp.

References emitARCUnsafeUnretainedScalarExpr(), and enterFullExpression().

Referenced by EmitARCStoreUnsafeUnretained(), and EmitScalarInit().

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

Definition at line 3955 of file CGBuiltin.cpp.

References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateDefaultAlignedStore(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenTypeCache::DoubleTy, EmitCommonNeonBuiltinExpr(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNeonShiftVector(), EmitNeonSplat(), EmitNounwindRuntimeCall(), EmitPointerWithAlignment(), EmitScalarExpr(), EmitSpecialRegisterBuiltin(), clang::Expr::EvaluateAsInt(), findNeonIntrinsicInMap(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::ASTContext::GetBuiltinType(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CallExpr::getDirectCallee(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::CodeGen::Address::getPointer(), getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSize(), getTypeSize(), HasExtraNeonArgument(), ID, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::Expr::isIntegerConstantExpr(), prefetch(), clang::CodeGen::Type, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitTargetArchBuiltinExpr().

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 1544 of file CGDecl.cpp.

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

Referenced by EmitArrayDelete(), emitDestroy(), and emitPartialArrayDestroy().

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 1543 of file CodeGenFunction.cpp.

References 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 EmitAggregateCopy(), EmitCXXAggrConstructorCall(), emitDestroy(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), and EmitOMPAggregateReduction().

LValue CodeGenFunction::EmitArraySubscriptExpr ( const ArraySubscriptExpr E,
bool  Accessed = false 
)
Address CodeGenFunction::EmitArrayToPointerDecay ( const Expr Array,
AlignmentSource AlignSource = nullptr 
)
void CodeGenFunction::EmitAsanPrologueOrEpilogue ( bool  Prologue)
void CodeGenFunction::EmitAsmStmt ( const AsmStmt S)

Definition at line 1791 of file CGStmt.cpp.

References clang::CodeGen::TargetCodeGenInfo::addReturnRegisterOutputs(), AddVariableConstraints(), clang::CodeGen::TargetCodeGenInfo::adjustInlineAsmType(), clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), Builder, CGM, ConvertType(), ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CurFnInfo, clang::TargetInfo::ConstraintInfo::earlyClobber(), EmitLValue(), EmitStoreThroughLValue(), FnRetTy, clang::AsmStmt::generateAsmString(), clang::CodeGen::RValue::get(), clang::AsmStmt::getAsmLoc(), getAsmSrcLocInfo(), clang::AsmStmt::getClobber(), clang::TargetInfo::getClobbers(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getDiags(), clang::Expr::getExprLoc(), clang::AsmStmt::getInputConstraint(), clang::AsmStmt::getInputExpr(), getLangOpts(), getLLVMContext(), clang::TargetInfo::getNormalizedGCCRegisterName(), clang::AsmStmt::getNumClobbers(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::AsmStmt::getOutputConstraint(), clang::AsmStmt::getOutputExpr(), clang::SourceLocation::getRawEncoding(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), getTarget(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), getTypeSize(), clang::TargetInfo::ConstraintInfo::hasMatchingInput(), hasScalarEvaluationKind(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::Expr::IgnoreParenNoopCasts(), Input, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isExtend(), clang::TargetInfo::ConstraintInfo::isReadWrite(), clang::AsmStmt::isVolatile(), MakeAddrLValue(), clang::Name, clang::DiagnosticsEngine::Report(), ReturnValue, S, SawAsmBlock, SimplifyConstraint(), clang::CodeGen::Type, clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateOutputConstraint(), and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitStmt().

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() 
)
RValue CodeGenFunction::EmitAtomicExpr ( AtomicExpr E)

Definition at line 661 of file CGAtomic.cpp.

References clang::CodeGen::CallArgList::add(), AddDirectArgument(), clang::prec::And, clang::ASTContext::BoolTy, Builder, CGM, convertTempToRValue(), ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), CurFn, EmitAtomicInit(), emitAtomicLibcall(), EmitAtomicOp(), EmitCastToVoidPtr(), EmitPointerWithAlignment(), EmitScalarExpr(), EmitStoreOfScalar(), EmitValToTemp(), clang::CodeGen::RValue::get(), clang::Type::getAs(), getContext(), clang::Expr::getExprLoc(), clang::ASTContext::getIntPtrType(), clang::ASTContext::getIntTypeForBitwidth(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::AtomicExpr::getNumSubExprs(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getSize(), getTarget(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::ASTContext::getTypeInfoInChars(), clang::ASTContext::getTypeSizeInChars(), clang::QualType::getUnqualifiedType(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), clang::AtomicExpr::isCmpXChg(), clang::Type::isPointerType(), clang::CodeGen::Address::isValid(), clang::Type::isVoidType(), MakeAddrLValue(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::ASTContext::toBits(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.

void CodeGenFunction::EmitAtomicInit ( Expr E,
LValue  lvalue 
)
RValue CodeGenFunction::EmitAtomicLoad ( LValue  LV,
SourceLocation  SL,
AggValueSlot  Slot = AggValueSlot::ignored() 
)
RValue CodeGenFunction::EmitAtomicLoad ( LValue  src,
SourceLocation  loc,
llvm::AtomicOrdering  AO,
bool  IsVolatile = false,
AggValueSlot  resultSlot = AggValueSlot::ignored() 
)

Emit a load from an l-value of atomic type.

Note that the r-value we produce is an r-value of the atomic value type.

Definition at line 1330 of file CGAtomic.cpp.

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

Definition at line 1809 of file CGAtomic.cpp.

Referenced by EmitOMPAtomicSimpleUpdateExpr().

void CodeGenFunction::EmitAttributedStmt ( const AttributedStmt S)
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 953 of file CGDecl.cpp.

References Builder, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), EmitLifetimeStart(), EmitStaticVarDecl(), EmitVarAnnotations(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getBlockByrefInfo(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLangOpts(), clang::NamedDecl::getName(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), getTarget(), clang::ValueDecl::getType(), getVLASize(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::InternalLinkage, clang::CodeGen::Address::invalid(), clang::Type::isArrayType(), 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(), clang::codegenoptions::LimitedDebugInfo, clang::CodeGen::NormalCleanup, NRVOFlags, clang::CharUnits::One(), pushStackRestore(), ReturnValue, Stack, clang::CodeGen::Type, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().

Referenced by EmitAutoVarDecl(), EmitObjCForCollectionStmt(), EmitOMPFirstprivateClause(), EmitOMPLinearClauseInit(), EmitOMPPrivateLoopCounters(), and EmitOMPReductionClauseInit().

void CodeGenFunction::EmitAutoVarCleanups ( const AutoVarEmission emission)
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 904 of file CGDecl.cpp.

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

Referenced by EmitForStmt(), EmitIfStmt(), EmitInitializerForField(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitVarDecl(), and EmitWhileStmt().

void CodeGenFunction::EmitAutoVarInit ( const AutoVarEmission emission)
void CodeGenFunction::emitAutoVarTypeCleanup ( const AutoVarEmission emission,
QualType::DestructionKind  dtorKind 
)
LValue CodeGenFunction::EmitBinaryOperatorLValue ( const BinaryOperator E)
void CodeGenFunction::EmitBlock ( llvm::BasicBlock *  BB,
bool  IsFinished = false 
)

EmitBlock - Emit the given block.

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

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

Definition at line 397 of file CGStmt.cpp.

References Builder, CurFn, and EmitBranch().

Referenced by EmitAggMemberInitializer(), emitArrayDestroy(), clang::CodeGen::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallOrInvoke(), clang::CodeGen::emitCancellationPointCall(), emitCatchDispatchBlock(), EmitCleanup(), EmitCtorPrologue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryFooter(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryHeader(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLabel(), EmitLandingPad(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), emitOMPIfClause(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPSimdDirective(), emitPostUpdateForReductionClause(), EmitReturnBlock(), EmitSEHTryStmt(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitVTablePtrCheckForCast(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), FinishFunction(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), and PerformReturnAdjustment().

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 434 of file CGStmt.cpp.

References Builder, and CurFn.

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

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 2028 of file CGBlocks.cpp.

References getBlockByrefInfo(), and clang::NamedDecl::getName().

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

Address CodeGenFunction::emitBlockByrefAddress ( Address  baseAddr,
const BlockByrefInfo info,
bool  followForward,
const llvm::Twine &  name 
)
RValue CodeGenFunction::EmitBlockCallExpr ( const CallExpr E,
ReturnValueSlot  ReturnValue 
)
llvm::Value * CodeGenFunction::EmitBlockCopyAndAutorelease ( llvm::Value Block,
QualType  Ty 
)
llvm::Value * CodeGenFunction::EmitBlockLiteral ( const BlockExpr blockExpr)

Emit a block literal expression in the current function.

Definition at line 679 of file CGBlocks.cpp.

References CGM, computeBlockInfo(), CurFn, findAndRemoveBlockInfo(), FirstBlockInfo, clang::BlockExpr::getBlockDecl(), and clang::BlockDecl::hasCaptures().

llvm::Value * CodeGenFunction::EmitBlockLiteral ( const CGBlockInfo Info)

Definition at line 698 of file CGBlocks.cpp.

References ActivateCleanupBlock(), 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, BlockInfo, buildBlockDescriptor(), Builder, buildGlobalBlock(), clang::CodeGen::CGBlockInfo::CanBeGlobal, clang::BlockDecl::captures(), clang::BlockDecl::capturesCXXThis(), CGM, clang::format::cleanup(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurGD, clang::CodeGen::CGBlockInfo::CXXThisIndex, clang::CodeGen::CGBlockInfo::CXXThisOffset, clang::CodeGen::Decl, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::CGBlockInfo::DominatingIP, EmitAggExpr(), EmitARCRetainNonBlock(), EmitDeclRefLValue(), EmitExprAsInit(), EmitSynthesizedCXXCopyCtor(), clang::CodeGen::AggValueSlot::forAddr(), GenerateBlockFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CGBlockInfo::Capture::getCleanup(), getContext(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenTypeCache::getIntSize(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getNSConcreteStackBlock(), clang::QualType::getObjCLifetime(), clang::CodeGen::CGBlockInfo::Capture::getOffset(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout, clang::CodeGen::CGBlockInfo::HasCXXObject, I, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::BlockDecl::isConversionFromLambda(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isReferenceType(), clang::CodeGen::Address::isValid(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), LoadBlockStruct(), LoadCXXThis(), clang::CodeGen::CGBlockInfo::LocalAddress, MakeAddrLValue(), clang::CodeGen::CGBlockInfo::NeedsCopyDispose, clang::Qualifiers::OCL_Strong, clang::ImplicitCastExpr::OnStack, clang::ast_matchers::type, clang::CodeGen::CGBlockInfo::UsesStret, clang::VK_LValue, clang::VK_RValue, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.

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 919 of file CodeGenFunction.cpp.

References CGM, createBasicBlock(), EmitBlock(), EmitBranch(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getCurrentProfileCount(), clang::CodeGenOptions::hasProfileClangInstr(), HaveInsertPoint(), incrementProfileCounter(), and setCurrentProfileCount().

Referenced by EmitCaseStmt(), EmitCaseStmtRange(), EmitDefaultStmt(), and EmitDoStmt().

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 743 of file CGExpr.cpp.

References Builder, getArrayIndexingBound(), clang::Expr::getExprLoc(), and clang::Type::isSignedIntegerOrEnumerationType().

Referenced by emitPointerArithmetic().

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 417 of file CGStmt.cpp.

References Builder.

Referenced by EmitAggMemberInitializer(), EmitBlock(), EmitBlockWithFallThrough(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXForRangeStmt(), EmitDynamicCast(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryFooter(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryHeader(), EmitForStmt(), EmitIfStmt(), EmitIndirectGotoStmt(), EmitOMPDistributeLoop(), emitOMPIfClause(), EmitOMPInnerLoop(), EmitOMPSimdDirective(), and EmitWhileStmt().

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 1186 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 clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitIfStmt(), emitOMPIfClause(), EmitOMPInnerLoop(), and emitPreCond().

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 997 of file CGCleanup.cpp.

References Builder, CreateNormalEntry(), createStoreInstBefore(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, E, clang::CodeGen::EHCleanupScope(), clang::CodeGen::EHScopeStack::stable_iterator::encloses(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getDestIndex(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), I, clang::CodeGen::BranchFixup::InitialBranch, clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::BranchFixup::OptimisticBranchBlock, and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().

Referenced by clang::CodeGen::emitBarrierCall(), EmitBreakStmt(), clang::CodeGen::emitCancellationPointCall(), EmitContinueStmt(), EmitCXXForRangeStmt(), EmitForStmt(), EmitForwardingCallToLambda(), EmitGotoStmt(), EmitIndirectGotoStmt(), EmitOMPInnerLoop(), EmitReturnStmt(), EmitSEHLeaveStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().

void CodeGenFunction::EmitBreakStmt ( const BreakStmt S)

Definition at line 1063 of file CGStmt.cpp.

References EmitBranchThroughCleanup(), EmitStopPoint(), and HaveInsertPoint().

Referenced by EmitSimpleStmt().

RValue CodeGenFunction::EmitBuiltinExpr ( const FunctionDecl FD,
unsigned  BuiltinID,
const CallExpr E,
ReturnValueSlot  ReturnValue 
)
RValue CodeGenFunction::EmitBuiltinNewDeleteCall ( const FunctionProtoType Type,
const Expr Arg,
bool  IsDelete 
)
void CodeGenFunction::emitByrefStructureInit ( const AutoVarEmission emission)
RValue CodeGenFunction::EmitCall ( const CGFunctionInfo FnInfo,
llvm::Value Callee,
ReturnValueSlot  ReturnValue,
const CallArgList Args,
CGCalleeInfo  CalleeInfo = CGCalleeInfo(),
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.

Definition at line 3507 of file CGCall.cpp.

References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), BuildAggStore(), Builder, CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, clang::CodeGen::CodeGenModule::ConstructAttributeList(), convertTempToRValue(), ConvertType(), ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurCodeDecl, CurrentFuncletPad, currentFunctionUsesSEHTry(), deactivateArgCleanupsBeforeCall(), clang::CodeGen::ABIArgInfo::Direct, E, emitAddressAtOffset(), EmitAggregateCopy(), EmitAlignmentAssumption(), EmitBlock(), EmitInitStoreOfNonAggregate(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitScalarExpr(), emitWritebacks(), EnsureInsertPoint(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CharUnits::fromQuantity(), clang::CodeGen::RValue::get(), clang::CodeGen::EHPersonality::get(), clang::FunctionProtoType::ExtParameterInfo::getABI(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::RValue::getAggregatePointer(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), getBundlesForFunclet(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::CallArgList::getCleanupsToDeactivate(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::ABIArgInfo::getDirectOffset(), getEvaluationKind(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getInvokeDest(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), getLLVMContext(), clang::CodeGen::Address::getName(), clang::CodeGen::ABIArgInfo::getPaddingType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CallArgList::getStackBase(), getTarget(), clang::CodeGen::Address::getType(), getTypes(), GetUndefRValue(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), clang::CodeGen::ReturnValueSlot::getValue(), clang::CodeGen::CallArgList::hasWritebacks(), HaveInsertPoint(), I, clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::Address::invalid(), clang::CodeGen::RValue::isAggregate(), isCleanupPadScope(), clang::CodeGen::ABIArgInfo::isCoerceAndExpand(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::EHPersonality::isMSVCXXPersonality(), clang::CodeGen::ReturnValueSlot::isNull(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::RValue::isScalar(), isSEHTryScope(), clang::CodeGen::ReturnValueSlot::isUnused(), clang::CodeGen::Address::isValid(), clang::CodeGen::CGFunctionInfo::isVariadic(), clang::CodeGen::ReturnValueSlot::isVolatile(), clang::CodeGen::RValue::isVolatileQualified(), MakeAddrLValue(), max(), clang::SwiftErrorResult, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::CodeGen::Type, and clang::CodeGen::CodeGenPGO::valueProfile().

Referenced by emitAtomicLibcall(), EmitBlockCallExpr(), EmitCallAndReturnForThunk(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitForwardingCallToLambda(), emitLibraryCall(), EmitNewDeleteCall(), EmitObjCForCollectionStmt(), emitStructGetterCall(), emitStructSetterCall(), generateObjCGetterBody(), and generateObjCSetterBody().

RValue CodeGenFunction::EmitCall ( QualType  FnType,
llvm::Value Callee,
const CallExpr E,
ReturnValueSlot  ReturnValue,
CGCalleeInfo  CalleeInfo = CGCalleeInfo(),
llvm::Value Chain = nullptr 
)
void CodeGenFunction::EmitCallAndReturnForThunk ( llvm::Value Callee,
const ThunkInfo Thunk 
)

Definition at line 254 of file CGVTables.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGCXXABI::adjustCallArgsForDestructorThunk(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), AutoreleaseResult, CGM, CurFnInfo, CurGD, EmitCall(), EmitDelegateCallArg(), EmitMustTailThunk(), clang::CodeGen::CGCXXABI::EmitReturnFromThunk(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), FinishThunk(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::Type::getAs(), clang::CodeGen::CGFunctionInfo::getCallingConvention(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getRegParm(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::FunctionType::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), hasScalarEvaluationKind(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CGFunctionInfoArgInfo::info, clang::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::CodeGen::ReturnValueSlot::isNull(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), LoadCXXThis(), LoadCXXThisAddress(), clang::FunctionDecl::parameters(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), clang::ThunkInfo::Return, ReturnValue, similar(), clang::ThunkInfo::This, clang::CodeGen::CGFunctionInfoArgInfo::type, clang::CodeGen::CGFunctionInfo::usesInAlloca(), and clang::ASTContext::VoidPtrTy.

Referenced by generateThunk().

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

EmitCallArg - Emit a single call argument.

Definition at line 3264 of file CGCall.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::CallArgList::addArgCleanupDeactivation(), clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), clang::CodeGen::LValue::asAggregateRValue(), clang::CodeGen::AggValueSlot::asRValue(), Builder, CGM, CreateAggTemp(), CreateMemTemp(), createPlaceholderSlot(), E, clang::CodeGen::EHCleanup, EHStack, EmitAggExpr(), EmitAggregateCopy(), EmitAnyExprToTemp(), EmitLValue(), EmitReferenceBindingToExpr(), emitWritebackArg(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::AggValueSlot::getAddress(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAsCXXRecordDecl(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::TargetInfo::getCXXABI(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), getLangOpts(), clang::Expr::getObjectKind(), clang::CodeGen::CGCXXABI::getRecordArgABI(), clang::CodeGen::CodeGenModule::getTarget(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), hasAggregateEvaluationKind(), clang::CXXRecordDecl::hasNonTrivialDestructor(), clang::Expr::isGLValue(), clang::Type::isReferenceType(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::CallArgList::isUsingInAlloca(), clang::CodeGen::LValue::isVolatile(), clang::OK_Ordinary, clang::CodeGen::CGCXXABI::RAA_Default, clang::CodeGen::AggValueSlot::setExternallyDestructed(), and clang::ast_matchers::type.

Referenced by EmitCallArgs().

template<typename T >
void clang::CodeGen::CodeGenFunction::EmitCallArgs ( CallArgList Args,
const T *  CallArgTypeInfo,
llvm::iterator_range< CallExpr::const_arg_iterator ArgRange,
const FunctionDecl CalleeDecl = nullptr,
unsigned  ParamsToSkip = 0 
)
inline
void CodeGenFunction::EmitCallArgs ( CallArgList Args,
ArrayRef< QualType ArgTypes,
llvm::iterator_range< CallExpr::const_arg_iterator ArgRange,
const FunctionDecl CalleeDecl = nullptr,
unsigned  ParamsToSkip = 0 
)
RValue CodeGenFunction::EmitCallExpr ( const CallExpr E,
ReturnValueSlot  ReturnValue = ReturnValueSlot() 
)
LValue CodeGenFunction::EmitCallExprLValue ( const CallExpr E)
llvm::CallSite CodeGenFunction::EmitCallOrInvoke ( llvm::Value Callee,
ArrayRef< llvm::Value * >  Args,
const Twine &  Name = "" 
)
void CodeGenFunction::EmitCapturedLocals ( CodeGenFunction ParentCGF,
const Stmt OutlinedStmt,
bool  IsFilter 
)
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 2173 of file CGStmt.cpp.

References CapturedStmtInfo, CGM, EmitCallOrInvoke(), GenerateCapturedStmtFunction(), clang::CodeGen::LValue::getPointer(), and InitCapturedStruct().

Referenced by EmitStmt().

void CodeGenFunction::EmitCaseStmt ( const CaseStmt S)
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 1090 of file CGStmt.cpp.

References Builder, createBasicBlock(), CurFn, EmitBlockWithFallThrough(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), getContext(), clang::CaseStmt::getLHS(), getProfileCount(), clang::CaseStmt::getRHS(), clang::CaseStmt::getSubStmt(), and I.

Referenced by EmitCaseStmt().

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 3564 of file CGExpr.cpp.

References Builder, E, clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::Type::getAs(), clang::CastExpr::getCastKind(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::CastExpr::path_begin(), and clang::CastExpr::path_end().

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

Emit a cross-DSO CFI failure handling function.

Definition at line 2653 of file CGExpr.cpp.

References Builder, clang::Create(), and clang::HiddenVisibility.

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

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

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

Definition at line 2602 of file CGExpr.cpp.

References Builder, and Node.

Referenced by EmitVTablePtrCheck().

void CodeGenFunction::EmitCheck ( ArrayRef< std::pair< llvm::Value *, SanitizerMask >>  Checked,
StringRef  CheckName,
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.

Definition at line 2497 of file CGExpr.cpp.

References Builder, emitCheckHandlerCall(), getRecoverableKind(), and Node.

Referenced by EmitFunctionEpilog(), EmitNonNullArgCheck(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), EmitVTableTypeCheckedLoad(), and GenerateCode().

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 943 of file CGExpr.cpp.

References E, clang::CodeGen::LValue::getAlignment(), clang::Expr::getExprLoc(), clang::CodeGen::LValue::getPointer(), clang::Expr::getType(), clang::CodeGen::LValue::isBitField(), and clang::CodeGen::LValue::isSimple().

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 2388 of file CGExpr.cpp.

References clang::begin(), Builder, clang::end(), Filename, clang::PresumedLoc::getColumn(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), I, INT_MIN, clang::PresumedLoc::isValid(), and Line.

Referenced by EmitFunctionEpilog(), EmitNonNullArgCheck(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), and GenerateCode().

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 2310 of file CGExpr.cpp.

References clang::DiagnosticsEngine::ak_qualtype, Buffer, Builder, clang::QualType::getAsOpaquePtr(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerType(), and clang::None.

Referenced by EmitVariablyModifiedType(), and EmitVTablePtrCheck().

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

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

Definition at line 2353 of file CGExpr.cpp.

References Builder, and clang::CodeGen::Address::getPointer().

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 
)
LValue CodeGenFunction::EmitComplexAssignmentLValue ( const BinaryOperator E)

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

Definition at line 1074 of file CGExprComplex.cpp.

References clang::BinaryOperator::getOpcode().

LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue ( const CompoundAssignOperator E)

Definition at line 1095 of file CGExprComplex.cpp.

References getComplexOp(), and clang::BinaryOperator::getOpcode().

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 1044 of file CGExprComplex.cpp.

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

Referenced by EmitAnyExpr(), EmitAtomicInit(), EmitExprAsInit(), and EvaluateExprAsBool().

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 1053 of file CGExprComplex.cpp.

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

Referenced by EmitAggMemberInitializer(), EmitAnyExprToMem(), EmitDeclInit(), EmitInitializerForField(), EmitReturnStmt(), and StoreAnyExprIntoOneUnit().

CodeGenFunction::ComplexPairTy CodeGenFunction::EmitComplexPrePostIncDec ( const UnaryOperator E,
LValue  LV,
bool  isInc,
bool  isPre 
)
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 3463 of file CGExprScalar.cpp.

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

Referenced by convertToScalarValue(), and EvaluateExprAsBool().

LValue CodeGenFunction::EmitCompoundAssignmentLValue ( const CompoundAssignOperator E)

Definition at line 3498 of file CGExprScalar.cpp.

References COMPOUND_OP, and clang::BinaryOperator::getOpcode().

LValue CodeGenFunction::EmitCompoundLiteralLValue ( const CompoundLiteralExpr E)
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 324 of file CGStmt.cpp.

References EmitCompoundStmtWithoutScope(), getContext(), and clang::CompoundStmt::getLBracLoc().

Referenced by EmitSimpleStmt().

Address CodeGenFunction::EmitCompoundStmtWithoutScope ( const CompoundStmt S,
bool  GetLast = false,
AggValueSlot  AVS = AggValueSlot::ignored() 
)
LValue CodeGenFunction::EmitConditionalOperatorLValue ( const AbstractConditionalOperator E)
void CodeGenFunction::EmitConstructorBody ( FunctionArgList Args)
void CodeGenFunction::EmitContinueStmt ( const ContinueStmt S)

Definition at line 1075 of file CGStmt.cpp.

References EmitBranchThroughCleanup(), EmitStopPoint(), and HaveInsertPoint().

Referenced by EmitSimpleStmt().

void CodeGenFunction::EmitCtorPrologue ( const CXXConstructorDecl CD,
CXXCtorType  CtorType,
FunctionArgList Args 
)
RValue CodeGenFunction::EmitCUDADevicePrintfCallExpr ( const CallExpr E,
ReturnValueSlot  ReturnValue 
)
RValue CodeGenFunction::EmitCUDAKernelCallExpr ( const CUDAKernelCallExpr E,
ReturnValueSlot  ReturnValue 
)
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 1917 of file CGClass.cpp.

References emitArrayLength().

Referenced by EmitCXXConstructExpr(), and EmitNewArrayInitializer().

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 1936 of file CGClass.cpp.

References clang::CharUnits::alignmentOfArrayElement(), Builder, createBasicBlock(), clang::Ctor_Complete, destroyCXXObject, EmitBlock(), EmitCXXConstructorCall(), EmitNullInitialization(), clang::CodeGen::Address::getAlignment(), getContext(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialDestructor(), pushRegularPartialArrayCleanup(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.

LValue CodeGenFunction::EmitCXXBindTemporaryLValue ( const CXXBindTemporaryExpr E)
void CodeGenFunction::EmitCXXConstructExpr ( const CXXConstructExpr E,
AggValueSlot  Dest 
)
LValue CodeGenFunction::EmitCXXConstructLValue ( const CXXConstructExpr E)
void CodeGenFunction::EmitCXXConstructorCall ( const CXXConstructorDecl D,
CXXCtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This,
const CXXConstructExpr E 
)
void CodeGenFunction::EmitCXXConstructorCall ( const CXXConstructorDecl D,
CXXCtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This,
CallArgList Args 
)
void CodeGenFunction::EmitCXXDeleteExpr ( const CXXDeleteExpr E)
void CodeGenFunction::EmitCXXDestructorCall ( const CXXDestructorDecl D,
CXXDtorType  Type,
bool  ForVirtualBase,
bool  Delegating,
Address  This 
)
RValue CodeGenFunction::EmitCXXDestructorCall ( const CXXDestructorDecl DD,
llvm::Value Callee,
llvm::Value This,
llvm::Value ImplicitParam,
QualType  ImplicitParamTy,
const CallExpr E,
StructorType  Type 
)
void CodeGenFunction::EmitCXXForRangeStmt ( const CXXForRangeStmt S,
ArrayRef< const Attr * >  Attrs = None 
)
void CodeGenFunction::EmitCXXGlobalVarDeclInit ( const VarDecl D,
llvm::Constant *  DeclPtr,
bool  PerformInit 
)
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 245 of file CGDeclCXX.cpp.

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

Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().

RValue CodeGenFunction::EmitCXXMemberCallExpr ( const CXXMemberCallExpr E,
ReturnValueSlot  ReturnValue 
)
Address CodeGenFunction::EmitCXXMemberDataPointerAddress ( const Expr E,
Address  base,
llvm::Value memberPtr,
const MemberPointerType memberPtrType,
AlignmentSource alignSource = nullptr 
)
RValue CodeGenFunction::EmitCXXMemberOrOperatorCall ( const CXXMethodDecl MD,
llvm::Value Callee,
ReturnValueSlot  ReturnValue,
llvm::Value This,
llvm::Value ImplicitParam,
QualType  ImplicitParamTy,
const CallExpr E 
)
RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr ( const CallExpr CE,
const CXXMethodDecl MD,
ReturnValueSlot  ReturnValue,
bool  HasQualifier,
NestedNameSpecifier Qualifier,
bool  IsArrow,
const Expr Base 
)

Definition at line 132 of file CGExprCXX.cpp.

References clang::CodeGen::CGCXXABI::adjustThisArgumentForVirtualFunctionCall(), clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), BuildAppleKextVirtualCall(), CanDevirtualizeMemberFunctionCall(), CFITCK_NVCall, CGM, clang::CodeGen::Complete, clang::Ctor_Complete, clang::Dtor_Complete, EmitAggregateAssign(), EmitAggregateCopy(), EmitCXXMemberOrOperatorCall(), EmitLValue(), EmitPointerWithAlignment(), clang::CodeGen::CGCXXABI::EmitVirtualDestructorCall(), EmitVTablePtrCheckForCall(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Expr::getBestDynamicClassType(), clang::QualType::getCanonicalType(), clang::CXXMethodDecl::getCorrespondingMethodInClass(), clang::CodeGen::CodeGenModule::getCXXABI(), getCXXRecord(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::CallExpr::getLocStart(), clang::CallExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGCXXABI::getVirtualFunctionPointer(), GetVTablePtr(), clang::SanitizerSet::has(), clang::Expr::ignoreParenBaseCasts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::FunctionDecl::isDefaulted(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CodeGen::ReturnValueSlot::isNull(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CXXMethodDecl::isVirtual(), clang::RecordDecl::mayInsertExtraPadding(), and SanOpts.

Referenced by EmitCXXMemberCallExpr(), and EmitCXXOperatorMemberCallExpr().

RValue CodeGenFunction::EmitCXXMemberPointerCallExpr ( const CXXMemberCallExpr E,
ReturnValueSlot  ReturnValue 
)
llvm::Value * CodeGenFunction::EmitCXXNewExpr ( const CXXNewExpr E)

Definition at line 1316 of file CGExprCXX.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CalculateCookiePadding(), clang::Type::castAs(), CGM, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), DeactivateCleanupBlock(), clang::CodeGen::Decl, EHStack, EmitBlock(), EmitCallArgs(), EmitCXXNewAllocSize(), EmitNewDeleteCall(), EmitNewInitializer(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAlignment(), clang::CXXNewExpr::getAllocatedType(), clang::ASTContext::getBaseElementType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::getNumPlacementArgs(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getSizeAlign(), clang::ASTContext::getSizeType(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CXXNewExpr::hasInitializer(), clang::CodeGen::CGCXXABI::InitializeArrayCookie(), clang::CodeGen::Address::invalid(), clang::CXXNewExpr::isArray(), clang::QualType::isPODType(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), max(), clang::CXXNewExpr::placement_arguments(), clang::CXXNewExpr::shouldNullCheckAllocation(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::CodeGen::Type.

RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr ( const CXXOperatorCallExpr E,
const CXXMethodDecl MD,
ReturnValueSlot  ReturnValue 
)
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 1223 of file CGCleanup.cpp.

References clang::CodeGen::NormalAndEHCleanup.

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

Definition at line 536 of file CGException.cpp.

References EmitStmt(), EnterCXXTryStmt(), ExitCXXTryStmt(), and clang::CXXTryStmt::getTryBlock().

Referenced by EmitStmt().

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

Definition at line 3888 of file CGExpr.cpp.

References clang::Expr::getType().

Address CodeGenFunction::EmitCXXUuidofExpr ( const CXXUuidofExpr E)

Definition at line 3892 of file CGExpr.cpp.

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

LValue CodeGenFunction::EmitCXXUuidofLValue ( const CXXUuidofExpr E)

Definition at line 3897 of file CGExpr.cpp.

References clang::Expr::getType().

void CodeGenFunction::EmitDecl ( const Decl D)
void CodeGenFunction::EmitDeclRefExprDbgValue ( const DeclRefExpr E,
llvm::Constant *  Init 
)
LValue CodeGenFunction::EmitDeclRefLValue ( const DeclRefExpr E)
void CodeGenFunction::EmitDeclStmt ( const DeclStmt S)

Definition at line 1053 of file CGStmt.cpp.

References clang::DeclStmt::decls(), EmitDecl(), EmitStopPoint(), HaveInsertPoint(), and I.

Referenced by EmitSimpleStmt().

void CodeGenFunction::EmitDefaultStmt ( const DefaultStmt S)

Definition at line 1251 of file CGStmt.cpp.

References EmitBlockWithFallThrough(), EmitStmt(), and clang::DefaultStmt::getSubStmt().

Referenced by EmitSimpleStmt().

void CodeGenFunction::EmitDelegateCallArg ( CallArgList args,
const VarDecl param,
SourceLocation  loc 
)
void CodeGenFunction::EmitDelegateCXXConstructorCall ( const CXXConstructorDecl Ctor,
CXXCtorType  CtorType,
const FunctionArgList Args,
SourceLocation  Loc 
)
void CodeGenFunction::EmitDelegatingCXXConstructorCall ( const CXXConstructorDecl Ctor,
const FunctionArgList Args 
)
void CodeGenFunction::EmitDeleteCall ( const FunctionDecl DeleteFD,
llvm::Value Ptr,
QualType  DeleteTy 
)
void CodeGenFunction::emitDestroy ( Address  addr,
QualType  type,
Destroyer destroyer,
bool  useEHCleanupForArray 
)

emitDestroy - Immediately perform the destruction of the given object.

Parameters
addr- the address of the object; a type*
type- the type of the object; if an array type, all objects are destroyed in reverse order
destroyer- the function to call to destroy individual elements
useEHCleanupForArray- whether an EH cleanup should be used when destroying array elements, in case one of the destructions throws an exception

Definition at line 1505 of file CGDecl.cpp.

References clang::CharUnits::alignmentOfArrayElement(), clang::begin(), Builder, emitArrayDestroy(), emitArrayLength(), clang::end(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getPointer(), and length().

Referenced by clang::CodeGen::emitThreadPrivateVarDefinition(), and generateDestroyHelper().

void CodeGenFunction::EmitDestructorBody ( FunctionArgList Args)
void CodeGenFunction::EmitDoStmt ( const DoStmt S,
ArrayRef< const Attr * >  Attrs = None 
)
llvm::Value * CodeGenFunction::EmitDynamicCast ( Address  V,
const CXXDynamicCastExpr DCE 
)
void CodeGenFunction::EmitEndEHSpec ( const Decl D)
void CodeGenFunction::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.

Emit an expression as an initializer for a variable at the given location.

The expression is not necessarily the normal initializer for the variable, and the address is not necessarily its normal location.

Parameters
initthe initializing expression
varthe variable to act as if we're initializing
locthe address to initialize; its type is a pointer to the LLVM mapping of the variable's type
alignmentthe alignment of the address
capturedByInittrue if the variable is a __block variable whose address is potentially changed by the initializer

Definition at line 1287 of file CGDecl.cpp.

References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, drillIntoBlockVariable(), EmitAggExpr(), EmitAtomicInit(), EmitComplexExpr(), EmitReferenceBindingToExpr(), EmitScalarInit(), EmitStoreOfComplex(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forLValue(), getEvaluationKind(), clang::ValueDecl::getType(), clang::Type::isAtomicType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isReferenceType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.

Referenced by EmitAutoVarInit(), EmitBlockLiteral(), EmitInitializerForField(), EmitOMPLinearClauseInit(), and emitPrivatesInit().

void CodeGenFunction::EmitExtendGCLifetime ( llvm::Value object)

EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point.

Definition at line 3146 of file CGObjC.cpp.

References clang::CodeGen::RequiredArgs::All, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.

LValue CodeGenFunction::EmitExtVectorElementExpr ( const ExtVectorElementExpr E)
Address CodeGenFunction::EmitExtVectorElementLValue ( LValue  V)
Address CodeGenFunction::EmitFieldAnnotations ( const FieldDecl D,
Address  V 
)
void CodeGenFunction::EmitForStmt ( const ForStmt S,
ArrayRef< const Attr * >  Attrs = None 
)
void CodeGenFunction::EmitForwardingCallToLambda ( const CXXMethodDecl LambdaCallOperator,
CallArgList CallArgs 
)
llvm::Value * CodeGenFunction::EmitFromMemory ( llvm::Value Value,
QualType  Ty 
)

EmitFromMemory - Change a scalar value from its memory representation to its value representation.

Definition at line 1363 of file CGExpr.cpp.

References Builder, and hasBooleanRepresentation().

Referenced by EmitFromInt().

void CodeGenFunction::EmitFunctionBody ( FunctionArgList Args,
const Stmt Body 
)
void CodeGenFunction::EmitFunctionEpilog ( const CGFunctionInfo FI,
bool  EmitRetDbgLoc,
SourceLocation  EndLoc 
)

EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.

Definition at line 2664 of file CGCall.cpp.

References AutoreleaseResult, clang::CodeGen::CGBlockInfo::BlockExpression, BlockInfo, Builder, CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), CreateCoercedLoad(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurCodeDecl, CurFn, clang::CodeGen::ABIArgInfo::Direct, emitAddressAtOffset(), emitAutoreleaseOfResult(), EmitCheck(), EmitCheckSourceLocation(), EmitLoadOfComplex(), EmitStoreOfComplex(), EmitStoreOfScalar(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, findDominatingStoreToReturnValue(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::BlockExpr::getFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaSRet(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::FunctionType::getReturnType(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), clang::SanitizerSet::has(), hasAggregateEvaluationKind(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::Address::invalid(), clang::Type::isObjCRetainableType(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::CodeGen::Address::isValid(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::None, ReturnValue, SanOpts, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::CodeGen::Type.

Referenced by FinishFunction().

void CodeGenFunction::EmitFunctionInstrumentation ( const char *  Fn)

EmitFunctionInstrumentation - Emit LLVM code to call the specified instrumentation function with the current function and the call site, if function instrumentation is enabled.

Definition at line 409 of file CodeGenFunction.cpp.

References Builder, CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurFn, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Type, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by FinishFunction(), and StartFunction().

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

This is also responsible for naming the LLVM function arguments.

Definition at line 2072 of file CGCall.cpp.

References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurCodeDecl, CurGD, clang::CodeGen::ABIArgInfo::Direct, E, EHStack, emitAddressAtOffset(), emitArgumentDemotion(), EmitLoadOfScalar(), EmitParmDecl(), EmitScalarExpr(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CodeGenFunction::ParamValue::forDirect(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CharUnits::fromQuantity(), clang::FunctionProtoType::ExtParameterInfo::getABI(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::ASTContext::getAsVariableArrayType(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectRealign(), clang::CodeGen::ABIArgInfo::getKind(), getLLVMContext(), clang::DeclaratorDecl::getLocStart(), clang::NamedDecl::getName(), getNonNullAttr(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), getTarget(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), hasScalarEvaluationKind(), I, clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::Type::isConstantSizeType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::Type::isIncompleteType(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::Type::isPointerType(), clang::QualType::isRestrictQualified(), MakeAddrLValue(), min(), clang::CodeGen::NormalCleanup, ReturnValue, clang::ArrayType::Static, clang::SwiftErrorResult, and clang::CodeGen::Type.

Referenced by StartFunction().

void CodeGenFunction::EmitGotoStmt ( const GotoStmt S)
void CodeGenFunction::EmitIfStmt ( const IfStmt S)
void CodeGenFunction::EmitIgnoredExpr ( const Expr E)
void CodeGenFunction::emitImplicitAssignmentOperatorBody ( FunctionArgList Args)
void CodeGenFunction::EmitIndirectGotoStmt ( const IndirectGotoStmt S)
void CodeGenFunction::EmitInheritedCXXConstructorCall ( const CXXConstructorDecl D,
bool  ForVirtualBase,
Address  This,
bool  InheritedFromVBase,
const CXXInheritedCtorInitExpr E 
)
void CodeGenFunction::EmitInitializerForField ( FieldDecl Field,
LValue  LHS,
Expr Init,
ArrayRef< VarDecl * >  ArrayIndexes 
)
LValue CodeGenFunction::EmitInitListLValue ( const InitListExpr E)
void CodeGenFunction::EmitInlinedInheritingCXXConstructorCall ( const CXXConstructorDecl Ctor,
CXXCtorType  CtorType,
bool  ForVirtualBase,
bool  Delegating,
CallArgList Args 
)
llvm::Value * CodeGenFunction::EmitIvarOffset ( const ObjCInterfaceDecl Interface,
const ObjCIvarDecl Ivar 
)

Definition at line 3940 of file CGExpr.cpp.

Referenced by generateObjCGetterBody(), and generateObjCSetterBody().

void CodeGenFunction::EmitLabel ( const LabelDecl D)
void CodeGenFunction::EmitLabelStmt ( const LabelStmt S)
void CodeGenFunction::EmitLambdaBlockInvokeBody ( )
void CodeGenFunction::EmitLambdaDelegatingInvokeBody ( const CXXMethodDecl MD)
void CodeGenFunction::EmitLambdaExpr ( const LambdaExpr E,
AggValueSlot  Dest 
)
LValue CodeGenFunction::EmitLambdaLValue ( const LambdaExpr E)
void CodeGenFunction::EmitLambdaStaticInvokeFunction ( const CXXMethodDecl MD)
void CodeGenFunction::EmitLambdaToBlockPointerBody ( FunctionArgList Args)
llvm::BasicBlock * CodeGenFunction::EmitLandingPad ( )
void CodeGenFunction::EmitLifetimeEnd ( llvm::Value Size,
llvm::Value Addr 
)
llvm::Value * CodeGenFunction::EmitLifetimeStart ( uint64_t  Size,
llvm::Value Addr 
)
RValue CodeGenFunction::EmitLoadOfBitfieldLValue ( LValue  LV)
ComplexPairTy CodeGenFunction::EmitLoadOfComplex ( LValue  src,
SourceLocation  loc 
)

EmitLoadOfComplex - Load a complex number from the specified l-value.

EmitLoadOfComplex - Load a complex number from the specified address.

Definition at line 1069 of file CGExprComplex.cpp.

Referenced by EmitFunctionEpilog(), emitInitWithReductionInitializer(), generateObjCGetterBody(), and InitCatchParam().

RValue CodeGenFunction::EmitLoadOfExtVectorElementLValue ( LValue  V)
RValue CodeGenFunction::EmitLoadOfGlobalRegLValue ( LValue  LV)

Load of global gamed gegisters are always calls to intrinsics.

Definition at line 1568 of file CGExpr.cpp.

References Builder, clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::LValue::getType(), clang::Type::isIntegerType(), and clang::Type::isPointerType().

RValue CodeGenFunction::EmitLoadOfLValue ( LValue  LV,
SourceLocation  Loc 
)
Address CodeGenFunction::EmitLoadOfPointer ( Address  Ptr,
const PointerType PtrTy,
AlignmentSource Source = nullptr 
)

Definition at line 1974 of file CGExpr.cpp.

References Builder, and clang::PointerType::getPointeeType().

LValue CodeGenFunction::EmitLoadOfPointerLValue ( Address  Ptr,
const PointerType PtrTy 
)
Address CodeGenFunction::EmitLoadOfReference ( Address  Ref,
const ReferenceType RefTy,
AlignmentSource Source = nullptr 
)
LValue CodeGenFunction::EmitLoadOfReferenceLValue ( Address  Ref,
const ReferenceType RefTy 
)

Definition at line 1967 of file CGExpr.cpp.

References clang::ReferenceType::getPointeeType().

Referenced by EmitGlobalVarDeclLValue(), and loadToBegin().

llvm::Value * CodeGenFunction::EmitLoadOfScalar ( Address  Addr,
bool  Volatile,
QualType  Ty,
SourceLocation  Loc,
AlignmentSource  AlignSource = AlignmentSource::Type,
llvm::MDNode *  TBAAInfo = nullptr,
QualType  TBAABaseTy = QualType(),
uint64_t  TBAAOffset = 0,
bool  isNontemporal = false 
)
llvm::Value * CodeGenFunction::EmitLoadOfScalar ( LValue  lvalue,
SourceLocation  Loc 
)

EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.

The l-value must be a simple l-value.

Definition at line 1196 of file CGExpr.cpp.

References clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isNontemporal(), and clang::CodeGen::LValue::isVolatile().

LValue CodeGenFunction::EmitLValue ( const Expr E)

EmitLValue - Emit code to compute a designator that specifies the location of the expression.

This can return one of two things: a simple address or a bitfield reference. In either case, the LLVM Value* in the LValue structure is guaranteed to be an LLVM pointer type.

If this returns a bitfield reference, nothing about the pointee type of the LLVM value is known: For example, it may not be a pointer to an integer.

If this returns a normal address, and if the lvalue's C type is fixed size, this method guarantees that the returned pointer type will point to an LLVM type of the same size of the lvalue's type. If the lvalue has a variable length type, this is not possible.

Definition at line 970 of file CGExpr.cpp.

References E, clang::Type::getAs(), clang::Expr::getType(), and clang::Type::isAnyComplexType().

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitAsmStmt(), EmitCallArg(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitIgnoredExpr(), EmitLValueOrThrowExpression(), EmitMSVAListRef(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCMessageExpr(), EmitOMPAtomicCaptureExpr(), EmitOMPAtomicReadExpr(), EmitOMPAtomicUpdateExpr(), EmitOMPAtomicWriteExpr(), EmitOMPCopyinClause(), EmitOMPFirstprivateClause(), EmitOMPHelperVar(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClauseFinal(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseInit(), emitPseudoObjectExpr(), EmitReferenceBindingToExpr(), emitStructSetterCall(), clang::CodeGen::emitTaskCall(), EmitTypeidFromVTable(), EmitVAListRef(), emitWritebackArg(), GenerateOpenMPCapturedVars(), tryEmitARCCopyWeakInit(), and tryEmitARCRetainLoadOfScalar().

LValue CodeGenFunction::EmitLValueForField ( LValue  Base,
const FieldDecl Field 
)

Definition at line 3310 of file CGExpr.cpp.

References clang::Qualifiers::addCVRQualifiers(), Builder, emitAddrOfFieldStorage(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::Type::getAs(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::CodeGen::Address::getElementType(), clang::CodeGen::getFieldAlignmentSource(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::ValueDecl::getType(), clang::CodeGen::LValue::getVRQualifiers(), clang::FieldDecl::isBitField(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::LValue::setTBAABaseType(), clang::CodeGen::LValue::setTBAAInfo(), clang::CodeGen::LValue::setTBAAOffset(), clang::CodeGen::CGBitFieldInfo::StorageOffset, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::ast_matchers::type, clang::Qualifiers::Volatile, clang::Qualifiers::Weak, and clang::QualType::withCVRQualifiers().

Referenced by EmitCapturedFieldLValue(), emitDestructorsFunction(), clang::CodeGen::emitDoacrossInit(), EmitMaterializeTemporaryExpr(), emitPrivatesInit(), emitProxyTaskFunction(), clang::CodeGen::emitTaskCall(), emitTaskDupFunction(), clang::CodeGen::emitTaskInit(), clang::CodeGen::emitTaskLoopCall(), emitTaskPrivateMappingFunction(), and GenerateCapturedStmtFunction().

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

Definition at line 3422 of file CGExpr.cpp.

References Builder, emitAddrOfFieldStorage(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::CodeGen::getFieldAlignmentSource(), clang::NamedDecl::getName(), clang::ValueDecl::getType(), and clang::Type::isReferenceType().

Referenced by EmitLambdaExpr(), EmitLValueForAnyFieldInitialization(), EmitMemberInitializer(), and InitCapturedStruct().

LValue CodeGenFunction::EmitLValueForIvar ( QualType  ObjectTy,
llvm::Value Base,
const ObjCIvarDecl Ivar,
unsigned  CVRQualifiers 
)
LValue CodeGenFunction::EmitLValueForLambdaField ( const FieldDecl Field)

Given that we are currently emitting a lambda, emit an l-value for one of its members.

Definition at line 3274 of file CGExpr.cpp.

References clang::FieldDecl::getParent().

Referenced by StartFunction().

LValue CodeGenFunction::EmitMaterializeTemporaryExpr ( const MaterializeTemporaryExpr E)

Definition at line 351 of file CGExpr.cpp.

References clang::SubobjectAdjustment::DTB::BasePath, CGM, ConvertTypeForMem(), createReferenceTemporary(), clang::CodeGen::Decl, clang::SubobjectAdjustment::DTB::DerivedClass, clang::SubobjectAdjustment::DerivedToBase, clang::SubobjectAdjustment::DerivedToBaseAdjustment, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, E, EmitAggExpr(), EmitAnyExprToMem(), EmitCXXMemberDataPointerAddress(), EmitIgnoredExpr(), EmitLifetimeStart(), EmitLValueForField(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitOpaqueValueLValue(), EmitScalarExpr(), EmitScalarInit(), clang::SubobjectAdjustment::Field, clang::SubobjectAdjustment::FieldAdjustment, clang::CodeGen::AggValueSlot::forAddr(), GetAddressOfBaseClass(), clang::CodeGen::Address::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::Expr::getExprLoc(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::QualType::getObjCLifetime(), clang::CodeGen::Address::getPointer(), clang::QualType::getQualifiers(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::GetTemporaryExpr(), clang::Expr::getType(), I, clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::SubobjectAdjustment::Kind, MakeAddrLValue(), clang::SubobjectAdjustment::MemberPointerAdjustment, clang::SubobjectAdjustment::P::MPT, clang::CodeGen::NormalEHLifetimeMarker, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::CastExpr::path_begin(), clang::CastExpr::path_end(), clang::SubobjectAdjustment::Ptr, pushTemporaryCleanup(), clang::SubobjectAdjustment::P::RHS, clang::SD_Automatic, clang::SD_FullExpression, clang::Expr::skipRValueSubobjectAdjustments(), clang::CodeGen::TEK_Aggregate, and clang::CodeGen::TEK_Scalar.

void CodeGenFunction::EmitMCountInstrumentation ( )

EmitMCountInstrumentation - Emit call to .mcount.

Definition at line 431 of file CodeGenFunction.cpp.

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

Referenced by StartFunction().

LValue CodeGenFunction::EmitMemberExpr ( const MemberExpr E)
Address CodeGenFunction::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.

Definition at line 1813 of file CodeGenFunction.cpp.

References EmitLValue(), and clang::CodeGen::LValue::getAddress().

Referenced by EmitVAArg(), and EmitX86BuiltinExpr().

void CodeGenFunction::EmitMustTailThunk ( const CXXMethodDecl MD,
llvm::Value AdjustedThisPtr,
llvm::Value Callee 
)
Value * CodeGenFunction::EmitNeonCall ( llvm::Function *  F,
SmallVectorImpl< llvm::Value * > &  O,
const char *  name,
unsigned  shift = 0,
bool  rightshift = false 
)
Value * CodeGenFunction::EmitNeonRShiftImm ( llvm::Value Vec,
llvm::Value Amt,
llvm::Type Ty,
bool  usgn,
const char *  name 
)
Value * CodeGenFunction::EmitNeonShiftVector ( llvm::Value V,
llvm::Type Ty,
bool  negateForRightShift 
)
Value * CodeGenFunction::EmitNeonSplat ( llvm::Value V,
llvm::Constant *  Idx 
)

Definition at line 2567 of file CGBuiltin.cpp.

References Builder.

Referenced by EmitAArch64BuiltinExpr(), EmitARMBuiltinExpr(), and EmitCommonNeonBuiltinExpr().

void CodeGenFunction::EmitNewArrayInitializer ( const CXXNewExpr E,
QualType  elementType,
llvm::Type ElementTy,
Address  NewPtr,
llvm::Value NumElements,
llvm::Value AllocSizeWithoutCookie 
)

Definition at line 831 of file CGExprCXX.cpp.

References clang::CharUnits::alignmentAtOffset(), clang::CharUnits::alignmentOfArrayElement(), Builder, CGM, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), DeactivateCleanupBlock(), EHStack, EmitBlock(), EmitCXXAggrConstructorCall(), clang::CodeGen::Address::getAlignment(), clang::CXXNewExpr::getAllocatedType(), clang::Type::getAs(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getConstantArrayElementCount(), getContext(), getDestroyer(), clang::CXXNewExpr::getInitializer(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), clang::CodeGen::CGBuilderTy::getSize(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CXXNewExpr::hasInitializer(), clang::CodeGen::Address::invalid(), clang::Type::isConstantArrayType(), clang::QualType::isDestructedType(), clang::CXXRecordDecl::isEmpty(), clang::FunctionDecl::isTrivial(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), needsEHCleanup(), pushIrregularPartialArrayCleanup(), pushRegularPartialArrayCleanup(), clang::CodeGen::EHScopeStack::stable_begin(), and StoreAnyExprIntoOneUnit().

Referenced by EmitNewInitializer().

void CodeGenFunction::EmitNonNullArgCheck ( RValue  RV,
QualType  ArgType,
SourceLocation  ArgLoc,
const FunctionDecl FD,
unsigned  ParmNum 
)
void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke ( llvm::Value callee,
ArrayRef< llvm::Value * >  args 
)

Emits a call or invoke to the given noreturn runtime function.

Definition at line 3425 of file CGCall.cpp.

References Builder, CurrentFuncletPad, getBundlesForFunclet(), getInvokeDest(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), and getUnreachableBlock().

llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall ( llvm::Value callee,
const Twine &  name = "" 
)
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall ( llvm::Value callee,
ArrayRef< llvm::Value * >  args,
const Twine &  name = "" 
)
void CodeGenFunction::EmitNullInitialization ( Address  DestPtr,
QualType  Ty 
)
Value * CodeGenFunction::EmitNVPTXBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
llvm::Value * CodeGenFunction::EmitObjCArrayLiteral ( const ObjCArrayLiteral E)
void CodeGenFunction::EmitObjCAtSynchronizedStmt ( const ObjCAtSynchronizedStmt S)
void CodeGenFunction::EmitObjCAtThrowStmt ( const ObjCAtThrowStmt S)
void CodeGenFunction::EmitObjCAtTryStmt ( const ObjCAtTryStmt S)
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup ( llvm::Value Ptr)
void CodeGenFunction::EmitObjCAutoreleasePoolPop ( llvm::Value value)
llvm::Value * CodeGenFunction::EmitObjCAutoreleasePoolPush ( )
void CodeGenFunction::EmitObjCAutoreleasePoolStmt ( const ObjCAutoreleasePoolStmt S)
llvm::Value * CodeGenFunction::EmitObjCBoxedExpr ( const ObjCBoxedExpr E)
llvm::Value * CodeGenFunction::EmitObjCCollectionLiteral ( const Expr E,
const ObjCMethodDecl MethodWithObjects 
)

Definition at line 113 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), Builder, CGM, Context, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::LangAS::Count, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), CreateMemTemp(), clang::CodeGen::Decl, E, EmitARCIntrinsicUse(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::RValue::get(), clang::Type::getAsObjCInterfacePointerType(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), clang::ObjCArrayLiteral::getElement(), clang::ObjCObjectType::getInterface(), clang::ObjCDictionaryLiteral::getKeyValueElement(), getLangOpts(), clang::ObjCArrayLiteral::getNumElements(), clang::ObjCDictionaryLiteral::getNumElements(), clang::ASTContext::getObjCIdType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCObjectPointerType::getObjectType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::CodeGen::Address::invalid(), clang::ObjCDictionaryElement::Key, MakeAddrLValue(), clang::ArrayType::Normal, clang::ObjCMethodDecl::param_begin(), clang::ObjCDictionaryElement::Value, and clang::QualType::withConst().

Referenced by EmitObjCArrayLiteral(), and EmitObjCDictionaryLiteral().

llvm::Value * CodeGenFunction::EmitObjCConsumeObject ( QualType  type,
llvm::Value object 
)

Produce the code for a CK_ARCConsumeObject.

Does a primitive release at the end of the full-expression.

Definition at line 1768 of file CGObjC.cpp.

References getARCCleanupKind().

Referenced by EmitARCExtendBlockObject(), EmitARCReclaimReturnedObject(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), and EmitObjCForCollectionStmt().

llvm::Value * CodeGenFunction::EmitObjCDictionaryLiteral ( const ObjCDictionaryLiteral E)
LValue CodeGenFunction::EmitObjCEncodeExprLValue ( const ObjCEncodeExpr E)

Definition at line 2279 of file CGExpr.cpp.

References clang::Expr::getType().

llvm::Value * CodeGenFunction::EmitObjCExtendObjectLifetime ( QualType  T,
llvm::Value Ptr 
)

Definition at line 1776 of file CGObjC.cpp.

References EmitARCRetainAutorelease().

void CodeGenFunction::EmitObjCForCollectionStmt ( const ObjCForCollectionStmt S)

Definition at line 1452 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionCall(), Builder, ConvertType(), clang::LangAS::Count, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), EmitARCRetainScalarExpr(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBlock(), EmitCall(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitLValue(), EmitNullInitialization(), EmitObjCConsumeObject(), EmitScalarExpr(), EmitScalarInit(), EmitStmt(), EmitStoreThroughLValue(), clang::CodeGen::CGObjCRuntime::EnumerationMutationFunction(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::RValue::get(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::ObjCForCollectionStmt::getBody(), clang::ObjCForCollectionStmt::getCollection(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), getContext(), getCurrentProfileCount(), getDebugInfo(), clang::ObjCForCollectionStmt::getElement(), getJumpDestInCurrentScope(), getLangOpts(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::ASTContext::getPointerType(), getProfileCount(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, incrementProfileCounter(), clang::CodeGen::CodeGenFunction::AutoVarEmission::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::ArrayType::Normal, clang::Qualifiers::OCL_ExplicitNone, clang::ASTContext::Selectors, clang::CodeGen::Type, clang::VK_LValue, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitStmt().

LValue CodeGenFunction::EmitObjCIsaExpr ( const ObjCIsaExpr E)
LValue CodeGenFunction::EmitObjCIvarRefLValue ( const ObjCIvarRefExpr E)
RValue CodeGenFunction::EmitObjCMessageExpr ( const ObjCMessageExpr E,
ReturnValueSlot  Return = ReturnValueSlot() 
)

Definition at line 341 of file CGObjC.cpp.

References AdjustObjCObjectType(), clang::ObjCMessageExpr::arguments(), Builder, CGM, clang::ObjCMessageExpr::Class, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateStore(), CurCodeDecl, CurFuncDecl, EmitARCLoadWeakRetained(), EmitARCRetainAutorelease(), EmitARCRetainNonBlock(), EmitCallArgs(), EmitLValue(), EmitScalarExpr(), findWeakLValue(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::CGObjCRuntime::GenerateMessageSendSuper(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::Type::getAs(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMessageExpr::getClassReceiver(), clang::CodeGen::Address::getElementType(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCObjectType::getInterface(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getMethodFamily(), getNullForVariable(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperType(), clang::Expr::getType(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isDelegateInitCall(), LoadObjCSelf(), clang::OMF_retain, shouldExtendReceiverForInnerPointerMessage(), clang::ObjCMessageExpr::SuperClass, clang::ObjCMessageExpr::SuperInstance, tryEmitARCRetainScalarExpr(), and clang::CodeGen::Type.

LValue CodeGenFunction::EmitObjCMessageExprLValue ( const ObjCMessageExpr E)
void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop ( llvm::Value Arg)
llvm::Value * CodeGenFunction::EmitObjCMRRAutoreleasePoolPush ( )

Produce the code to do an MRR version objc_autoreleasepool_push.

Which is: [[NSAutoreleasePool alloc] init]; Where alloc is declared as: + (id) alloc; in NSAutoreleasePool class. init is declared as: - (id) init; in its NSObject super class.

Definition at line 2324 of file CGObjC.cpp.

References clang::CodeGen::CGObjCRuntime::EmitNSAutoreleasePoolClassRef(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), clang::ASTContext::Idents, and clang::ASTContext::Selectors.

Referenced by EmitObjCAutoreleasePoolStmt().

llvm::Value * CodeGenFunction::EmitObjCProtocolExpr ( const ObjCProtocolExpr E)
llvm::Value * CodeGenFunction::EmitObjCSelectorExpr ( const ObjCSelectorExpr E)
LValue CodeGenFunction::EmitObjCSelectorLValue ( const ObjCSelectorExpr E)

Definition at line 3934 of file CGExpr.cpp.

References clang::ObjCSelectorExpr::getSelector(), and clang::Expr::getType().

llvm::Value * CodeGenFunction::EmitObjCStringLiteral ( const ObjCStringLiteral E)
llvm::Value * CodeGenFunction::EmitObjCThrowOperand ( const Expr expr)
void CodeGenFunction::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.

Parameters
DestAddrAddress of the destination array.
SrcAddrAddress of the source array.
OriginalTypeType of destination and source arrays.
CopyGenCopying procedure that copies value of single array element to another single array element.

Definition at line 323 of file CGStmtOpenMP.cpp.

References clang::CharUnits::alignmentOfArrayElement(), Builder, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), emitArrayLength(), EmitBlock(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::Address::getPointer(), and clang::ASTContext::getTypeSizeInChars().

Referenced by EmitOMPCopy(), EmitOMPFirstprivateClause(), and emitPrivatesInit().

LValue CodeGenFunction::EmitOMPArraySectionExpr ( const OMPArraySectionExpr E,
bool  IsLowerBound = true 
)
void CodeGenFunction::EmitOMPAtomicDirective ( const OMPAtomicDirective S)
std::pair< bool, RValue > CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr ( 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.

Parameters
XValue to be updated.
EUpdate value.
BOBinary operation for update operation.
IsXLHSInRHSParttrue if X is LHS in RHS part of the update expression, false otherwise.
AOAtomic ordering of the generated atomic instructions.
CommonGenCode generator for complex expressions that cannot be expressed through atomicrmw instruction.
Returns
<true, OldAtomicValue> if simple 'atomicrmw' instruction was generated, <false, RValue::get(nullptr)> otherwise.

Definition at line 2979 of file CGStmtOpenMP.cpp.

References EmitAtomicUpdate(), EmitLoadOfLValue(), emitOMPAtomicRMW(), EmitStoreThroughLValue(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isGlobalReg(), and clang::QualType::isVolatileQualified().

Referenced by EmitOMPAtomicCaptureExpr(), and EmitOMPAtomicUpdateExpr().

void CodeGenFunction::EmitOMPBarrierDirective ( const OMPBarrierDirective S)
void CodeGenFunction::EmitOMPCancelDirective ( const OMPCancelDirective S)
void CodeGenFunction::EmitOMPCancellationPointDirective ( const OMPCancellationPointDirective S)
void CodeGenFunction::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.

Parameters
OriginalTypeOriginal type of the copied variables.
DestAddrDestination address.
SrcAddrSource address.
DestVDDestination variable used in CopyExpr (for arrays, has type of the base array element).
SrcVDSource variable used in CopyExpr (for arrays, has type of the base array element).
CopyActual copygin expression for copying data from SrcVD to DestVD.

Definition at line 534 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), EmitAggregateAssign(), EmitIgnoredExpr(), EmitOMPAggregateAssign(), clang::Type::isArrayType(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().

Referenced by emitCopyprivateCopyFunction(), EmitOMPCopyinClause(), and EmitOMPLastprivateClauseFinal().

bool CodeGenFunction::EmitOMPCopyinClause ( const OMPExecutableDirective D)

Emit code for copyin clause in D directive.

The next code is generated at the start of outlined functions for directives:

threadprivate_var1 = master_threadprivate_var1;
operator=(threadprivate_var2, master_threadprivate_var2);
...
__kmpc_barrier(&loc, global_tid);
Parameters
DOpenMP directive possibly with 'copyin' clause(s).
Returns
true if at least one copyin variable is found, false otherwise.

Definition at line 692 of file CGStmtOpenMP.cpp.

References Builder, CapturedStmtInfo, CGM, createBasicBlock(), EmitBlock(), EmitLValue(), EmitOMPCopy(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::GetAddrOfGlobal(), clang::VarDecl::getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), getContext(), clang::ASTContext::getDeclAlign(), getLangOpts(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenModule::getStaticLocalDeclAddress(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::VarDecl::isStaticLocal(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), and clang::VK_LValue.

Referenced by EmitOMPParallelDirective().

void CodeGenFunction::EmitOMPCriticalDirective ( const OMPCriticalDirective S)
void CodeGenFunction::EmitOMPDistributeDirective ( const OMPDistributeDirective S)
void CodeGenFunction::EmitOMPDistributeLoop ( const OMPDistributeDirective S)
void CodeGenFunction::EmitOMPDistributeParallelForDirective ( const OMPDistributeParallelForDirective S)
void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective ( const OMPDistributeParallelForSimdDirective S)
void CodeGenFunction::EmitOMPDistributeSimdDirective ( const OMPDistributeSimdDirective S)
bool CodeGenFunction::EmitOMPFirstprivateClause ( const OMPExecutableDirective D,
OMPPrivateScope PrivateScope 
)
void CodeGenFunction::EmitOMPFlushDirective ( const OMPFlushDirective S)
void CodeGenFunction::EmitOMPForDirective ( const OMPForDirective S)
void CodeGenFunction::EmitOMPForSimdDirective ( const OMPForSimdDirective S)
void CodeGenFunction::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.

Parameters
SDirective, for which the inner loop must be emitted.
RequiresCleanuptrue, if directive has some associated private variables.
LoopCondBollean condition for loop continuation.
IncExprIncrement expression for loop control variable.
BodyGenGenerator for the inner body of the inner loop.
PostIncGenGenrator for post-increment code (required for ordered loop directvies).

Definition at line 1274 of file CGStmtOpenMP.cpp.

References Builder, createBasicBlock(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), EmitBranchThroughCleanup(), EmitIgnoredExpr(), getJumpDestInCurrentScope(), getProfileCount(), incrementProfileCounter(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), and clang::CodeGen::LoopInfoStack::push().

Referenced by EmitOMPDistributeLoop(), and EmitOMPSimdDirective().

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

Parameters
DDirective that has at least one 'lastprivate' directives.
IsLastIterCondBoolean condition that must be set to 'i1 true' if it is the last iteration of the loop code in associated directive, or to 'i1 false' otherwise. If this item is nullptr, no final check is required.

Definition at line 816 of file CGStmtOpenMP.cpp.

References Builder, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateLoad(), EmitBlock(), EmitIgnoredExpr(), EmitOMPCopy(), GetAddrOfLocalVar(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), getNaturalTypeAlignment(), and HaveInsertPoint().

Referenced by EmitOMPSimdDirective().

bool CodeGenFunction::EmitOMPLastprivateClauseInit ( const OMPExecutableDirective D,
OMPPrivateScope PrivateScope 
)

Emit initial code for lastprivate variables.

If some variable is not also firstprivate, then the default initialization is used. Otherwise initialization of this variable is performed by EmitOMPFirstprivateClause method.

Parameters
DDirective that may have 'lastprivate' directives.
PrivateScopePrivate scope for capturing lastprivate variables for proper codegen in internal captured statement.
Returns
true if there is at least one lastprivate variable, false otherwise.

Definition at line 758 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), CapturedStmtInfo, EmitDecl(), EmitLValue(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskLoopDirective(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), and clang::VK_LValue.

Referenced by EmitOMPSimdDirective().

void CodeGenFunction::EmitOMPLinearClause ( const OMPLoopDirective D,
CodeGenFunction::OMPPrivateScope PrivateScope 
)
void CodeGenFunction::EmitOMPLinearClauseFinal ( const OMPLoopDirective D,
const llvm::function_ref< llvm::Value *(CodeGenFunction &)> &  CondGen 
)
void CodeGenFunction::EmitOMPLinearClauseInit ( const OMPLoopDirective D)
void CodeGenFunction::EmitOMPMasterDirective ( const OMPMasterDirective S)
void CodeGenFunction::EmitOMPOrderedDirective ( const OMPOrderedDirective S)
void CodeGenFunction::EmitOMPParallelDirective ( const OMPParallelDirective S)
void CodeGenFunction::EmitOMPParallelForDirective ( const OMPParallelForDirective S)

Definition at line 2373 of file CGStmtOpenMP.cpp.

References emitCommonOMPParallelDirective(), and S.

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPParallelForSimdDirective ( const OMPParallelForSimdDirective S)

Definition at line 2383 of file CGStmtOpenMP.cpp.

References emitCommonOMPParallelDirective(), and S.

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPParallelSectionsDirective ( const OMPParallelSectionsDirective S)

Definition at line 2393 of file CGStmtOpenMP.cpp.

References emitCommonOMPParallelDirective(), and S.

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPPrivateClause ( const OMPExecutableDirective D,
CodeGenFunction::OMPPrivateScope PrivateScope 
)
void CodeGenFunction::EmitOMPPrivateLoopCounters ( const OMPLoopDirective S,
CodeGenFunction::OMPPrivateScope LoopScope 
)
void CodeGenFunction::EmitOMPReductionClauseFinal ( const OMPExecutableDirective D)
void CodeGenFunction::EmitOMPReductionClauseInit ( const OMPExecutableDirective D,
CodeGenFunction::OMPPrivateScope PrivateScope 
)
void CodeGenFunction::EmitOMPSectionDirective ( const OMPSectionDirective S)
void CodeGenFunction::EmitOMPSectionsDirective ( const OMPSectionsDirective S)
void CodeGenFunction::EmitOMPSimdDirective ( const OMPSimdDirective S)
void CodeGenFunction::emitOMPSimpleStore ( LValue  LVal,
RValue  RVal,
QualType  RValTy,
SourceLocation  Loc 
)
void CodeGenFunction::EmitOMPSingleDirective ( const OMPSingleDirective S)
void CodeGenFunction::EmitOMPTargetDataDirective ( const OMPTargetDataDirective S)
void CodeGenFunction::EmitOMPTargetDirective ( const OMPTargetDirective S)
std::pair< llvm::Function *, llvm::Constant * > CodeGenFunction::EmitOMPTargetDirectiveOutlinedFunction ( CodeGenModule CGM,
const OMPTargetDirective S,
StringRef  ParentName,
bool  IsOffloadEntry 
)
static
void CodeGenFunction::EmitOMPTargetEnterDataDirective ( const OMPTargetEnterDataDirective S)
void CodeGenFunction::EmitOMPTargetExitDataDirective ( const OMPTargetExitDataDirective S)
void CodeGenFunction::EmitOMPTargetParallelDirective ( const OMPTargetParallelDirective S)

Definition at line 3456 of file CGStmtOpenMP.cpp.

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPTargetParallelForDirective ( const OMPTargetParallelForDirective S)

Definition at line 3461 of file CGStmtOpenMP.cpp.

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPTargetParallelForSimdDirective ( const OMPTargetParallelForSimdDirective S)
void CodeGenFunction::EmitOMPTargetUpdateDirective ( const OMPTargetUpdateDirective S)
void CodeGenFunction::EmitOMPTaskBasedDirective ( const OMPExecutableDirective S,
const RegionCodeGenTy BodyGen,
const TaskGenTy TaskGen,
OMPTaskDataTy Data 
)
void CodeGenFunction::EmitOMPTaskDirective ( const OMPTaskDirective S)
void CodeGenFunction::EmitOMPTaskgroupDirective ( const OMPTaskgroupDirective S)
void CodeGenFunction::EmitOMPTaskLoopBasedDirective ( const OMPLoopDirective S)
void CodeGenFunction::EmitOMPTaskLoopDirective ( const OMPTaskLoopDirective S)

Definition at line 3603 of file CGStmtOpenMP.cpp.

References EmitOMPTaskLoopBasedDirective().

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPTaskLoopSimdDirective ( const OMPTaskLoopSimdDirective S)

Definition at line 3607 of file CGStmtOpenMP.cpp.

References EmitOMPTaskLoopBasedDirective().

Referenced by EmitStmt().

void CodeGenFunction::EmitOMPTaskwaitDirective ( const OMPTaskwaitDirective S)
void CodeGenFunction::EmitOMPTaskyieldDirective ( const OMPTaskyieldDirective S)
void CodeGenFunction::EmitOMPTeamsDirective ( const OMPTeamsDirective S)
LValue CodeGenFunction::EmitOpaqueValueLValue ( const OpaqueValueExpr e)

Definition at line 3704 of file CGExpr.cpp.

Referenced by EmitMaterializeTemporaryExpr().

void CodeGenFunction::EmitParmDecl ( const VarDecl D,
ParamValue  Arg,
unsigned  ArgNo 
)

EmitParmDecl - Emit a ParmVarDecl or an ImplicitParamDecl.

Emit an alloca (or GlobalValue depending on target) for the specified parameter and set up LocalDeclMap.

Definition at line 1747 of file CGDecl.cpp.

References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), BlockInfo, Builder, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateMemTemp(), CurCodeDecl, CurFuncIsThunk, clang::QualType::DK_cxx_destructor, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitStoreOfScalar(), EmitVarAnnotations(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), getARCCleanupKind(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::TargetInfo::getCXXABI(), getDebugInfo(), clang::CodeGen::CodeGenFunction::ParamValue::getDirectValue(), clang::CodeGen::CodeGenFunction::ParamValue::getIndirectAddress(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::Address::getPointer(), clang::QualType::getQualifiers(), clang::ObjCMethodDecl::getSelfDecl(), getTarget(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), clang::Qualifiers::hasConst(), clang::CXXRecordDecl::hasNonTrivialDestructor(), hasScalarEvaluationKind(), clang::CodeGen::Address::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::CodeGen::CodeGenFunction::ParamValue::isIndirect(), clang::codegenoptions::LimitedDebugInfo, MakeAddrLValue(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::OMF_init, pushDestroy(), setBlockContextParameter(), and clang::CodeGen::Type.

Referenced by EmitFunctionProlog(), and EmitInlinedInheritingCXXConstructorCall().

LValue CodeGenFunction::EmitPointerToDataMemberBinaryExpr ( const BinaryOperator E)
Address CodeGenFunction::EmitPointerWithAlignment ( const Expr E,
AlignmentSource Source = nullptr 
)

EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.

EmitPointerWithAlignment - Given an expression of pointer type, try to derive a more accurate bound on the alignment of the pointer.

Note that this function will conservatively fall back on the type when it doesn't

Parameters
Source- If non-null, this will be initialized with information about the source of the alignment. Note that this function will conservatively fall back on the type when it doesn't recognize the expression, which means that sometimes

a worst-case One reasonable way to use this information is when there's a language guarantee that the pointer must be aligned to some stricter value, and we're simply trying to ensure that sufficiently obvious uses of under-aligned objects don't get miscompiled; for example, a placement new into the address of a local variable. In such a case, it's quite reasonable to just ignore the returned alignment when it isn't from an explicit source.

Definition at line 820 of file CGExpr.cpp.

References Builder, clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::CodeGen::Address::getPointer(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Type::isObjCObjectPointerType(), and clang::Type::isPointerType().

Referenced by EmitAMDGPUBuiltinExpr(), EmitARMBuiltinExpr(), EmitAtomicExpr(), EmitCXXDeleteExpr(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), emitOMPArraySectionBase(), EmitSystemZIntrinsicWithCC(), EmitVAListRef(), and emitWritebackArg().

Value * CodeGenFunction::EmitPPCBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
LValue CodeGenFunction::EmitPredefinedLValue ( const PredefinedExpr E)
LValue CodeGenFunction::EmitPseudoObjectLValue ( const PseudoObjectExpr e)

Definition at line 4261 of file CGExpr.cpp.

References emitPseudoObjectExpr().

RValue CodeGenFunction::EmitPseudoObjectRValue ( const PseudoObjectExpr e,
AggValueSlot  slot = AggValueSlot::ignored() 
)

Definition at line 4256 of file CGExpr.cpp.

References emitPseudoObjectExpr().

RValue CodeGenFunction::EmitReferenceBindingToExpr ( const Expr E)
llvm::DebugLoc CodeGenFunction::EmitReturnBlock ( )

Emit the unified return block, trying to avoid its emission when possible.

Returns
The debug location of the user written return statement if the return block is is avoided.

Definition at line 223 of file CodeGenFunction.cpp.

References Builder, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), and ReturnBlock.

Referenced by FinishFunction().

void CodeGenFunction::EmitReturnStmt ( const ReturnStmt S)
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall ( llvm::Value callee,
const Twine &  name = "" 
)
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall ( llvm::Value callee,
ArrayRef< llvm::Value * >  args,
const Twine &  name = "" 
)
llvm::CallSite CodeGenFunction::EmitRuntimeCallOrInvoke ( llvm::Value callee,
ArrayRef< llvm::Value * >  args,
const Twine &  name = "" 
)

Emits a call or invoke instruction to the given runtime function.

Definition at line 3456 of file CGCall.cpp.

References EmitCallOrInvoke(), and clang::CodeGen::CodeGenTypeCache::getRuntimeCC().

Referenced by EmitObjCAutoreleasePoolPop(), emitRTtypeidCall(), EmitRuntimeCallOrInvoke(), and GenerateCopyHelperFunction().

llvm::CallSite CodeGenFunction::EmitRuntimeCallOrInvoke ( llvm::Value callee,
const Twine &  name = "" 
)

Emits a call or invoke instruction to the given nullary runtime function.

Definition at line 3449 of file CGCall.cpp.

References EmitRuntimeCallOrInvoke(), and clang::None.

RValue CodeGenFunction::EmitRValueForField ( LValue  LV,
const FieldDecl FD,
SourceLocation  Loc 
)
void CodeGenFunction::EmitSanitizerStatReport ( llvm::SanitizerStatKind  SSK)
LValue CodeGenFunction::EmitScalarCompoundAssignWithComplex ( const CompoundAssignOperator E,
llvm::Value *&  Result 
)

Definition at line 1102 of file CGExprComplex.cpp.

References getComplexOp(), and clang::BinaryOperator::getOpcode().

Value * CodeGenFunction::EmitScalarConversion ( llvm::Value Src,
QualType  SrcTy,
QualType  DstTy,
SourceLocation  Loc 
)
Value * CodeGenFunction::EmitScalarExpr ( const Expr E,
bool  IgnoreResultAssign = false 
)

EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result.

Emit the computation of the specified expression of scalar type, ignoring the result.

Definition at line 3443 of file CGExprScalar.cpp.

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

Referenced by EmitAArch64BuiltinExpr(), emitAlignedClause(), EmitAMDGPUBuiltinExpr(), EmitAnyExpr(), EmitAnyExprToMem(), EmitARCExtendBlockObject(), emitARCRetainCallResult(), EmitARCStoreUnsafeUnretained(), emitARCUnsafeClaimCallResult(), EmitARMBuiltinExpr(), EmitAtomicExpr(), EmitAtomicInit(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitBinaryAtomicPost(), emitBinaryBuiltin(), EmitBlockCallExpr(), EmitCall(), emitCommonOMPParallelDirective(), clang::CodeGen::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitDeclInit(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::emitDoacrossOrdered(), emitFPIntBuiltin(), EmitFunctionProlog(), EmitIndirectGotoStmt(), EmitInitializerForField(), EmitMaterializeTemporaryExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), emitNumTeamsClauseForTargetDirective(), EmitNVPTXBuiltinExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitOMPDistributeLoop(), EmitOMPTaskBasedDirective(), EmitOMPTaskLoopBasedDirective(), EmitPPCBuiltinExpr(), EmitReturnStmt(), EmitScalarInit(), EmitSpecialRegisterBuiltin(), EmitSwitchStmt(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), emitTernaryBuiltin(), emitThreadLimitClauseForTargetDirective(), emitUnaryBuiltin(), EmitVariablyModifiedType(), EmitWebAssemblyBuiltinExpr(), EmitX86BuiltinExpr(), EvaluateExprAsBool(), GenerateSEHFilterFunction(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), and tryEmitARCRetainLoadOfScalar().

void CodeGenFunction::EmitScalarInit ( const Expr init,
const ValueDecl D,
LValue  lvalue,
bool  capturedByInit 
)
void CodeGenFunction::EmitScalarInit ( llvm::Value init,
LValue  lvalue 
)
llvm::Value * CodeGenFunction::EmitScalarPrePostIncDec ( const UnaryOperator E,
LValue  LV,
bool  isInc,
bool  isPre 
)

Definition at line 3475 of file CGExprScalar.cpp.

llvm::Value * CodeGenFunction::EmitSEHAbnormalTermination ( )

Definition at line 1772 of file CGException.cpp.

References Builder, CurFn, and clang::CodeGen::CodeGenTypeCache::Int32Ty.

llvm::Value * CodeGenFunction::EmitSEHExceptionCode ( )
void CodeGenFunction::EmitSEHExceptionCodeSave ( CodeGenFunction ParentCGF,
llvm::Value ParentFP,
llvm::Value EntryEBP 
)
llvm::Value * CodeGenFunction::EmitSEHExceptionInfo ( )

Definition at line 1758 of file CGException.cpp.

References clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and SEHInfo.

void CodeGenFunction::EmitSEHLeaveStmt ( const SEHLeaveStmt S)
void CodeGenFunction::EmitSEHTryStmt ( const SEHTryStmt S)
bool CodeGenFunction::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.

Returns
True if the statement was handled.

Definition at line 301 of file CGStmt.cpp.

References EmitAttributedStmt(), EmitBreakStmt(), EmitCaseStmt(), EmitCompoundStmt(), EmitContinueStmt(), EmitDeclStmt(), EmitDefaultStmt(), EmitGotoStmt(), EmitLabelStmt(), and EmitSEHLeaveStmt().

Referenced by EmitStmt().

void CodeGenFunction::EmitStartEHSpec ( const Decl D)
void CodeGenFunction::EmitStaticVarDecl ( const VarDecl D,
llvm::GlobalValue::LinkageTypes  Linkage 
)
void CodeGenFunction::EmitStmt ( const Stmt S)

EmitStmt - Emit the code for the statement.

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

This function may clear the current insertion point; callers should use EnsureInsertPoint if they wish to subsequently generate code without first calling EmitBlock, EmitBranch, or EmitStmt.

Definition at line 48 of file CGStmt.cpp.

References Builder, CGM, ContainsLabel(), EmitAsmStmt(), EmitCapturedStmt(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDoStmt(), EmitForStmt(), EmitIfStmt(), EmitIgnoredExpr(), EmitIndirectGotoStmt(), EmitObjCAtSynchronizedStmt(), EmitObjCAtThrowStmt(), EmitObjCAtTryStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPAtomicDirective(), EmitOMPBarrierDirective(), EmitOMPCancelDirective(), EmitOMPCancellationPointDirective(), EmitOMPCriticalDirective(), EmitOMPDistributeDirective(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPFlushDirective(), EmitOMPForDirective(), EmitOMPForSimdDirective(), EmitOMPMasterDirective(), EmitOMPOrderedDirective(), EmitOMPParallelDirective(), EmitOMPParallelForDirective(), EmitOMPParallelForSimdDirective(), EmitOMPParallelSectionsDirective(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdDirective(), EmitOMPSingleDirective(), EmitOMPTargetDataDirective(), EmitOMPTargetDirective(), EmitOMPTargetEnterDataDirective(), EmitOMPTargetExitDataDirective(), EmitOMPTargetParallelDirective(), EmitOMPTargetParallelForDirective(), EmitOMPTargetParallelForSimdDirective(), EmitOMPTargetUpdateDirective(), EmitOMPTaskDirective(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopDirective(), EmitOMPTaskLoopSimdDirective(), EmitOMPTaskwaitDirective(), EmitOMPTaskyieldDirective(), EmitOMPTeamsDirective(), EmitReturnStmt(), EmitSEHTryStmt(), EmitSimpleStmt(), EmitStopPoint(), EmitSwitchStmt(), EmitWhileStmt(), EnsureInsertPoint(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CapturedStmt::getCapturedRegionKind(), HaveInsertPoint(), S, and clang::CodeGen::CodeGenPGO::setCurrentStmt().

Referenced by clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAttributedStmt(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCompoundStmtWithoutScope(), EmitConstructorBody(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDefaultStmt(), EmitDestructorBody(), EmitDoStmt(), EmitForStmt(), EmitFunctionBody(), EmitIfStmt(), EmitLabelStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPCriticalDirective(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPMasterDirective(), EmitOMPParallelDirective(), EmitOMPSectionDirective(), EmitOMPSingleDirective(), EmitOMPTargetDataDirective(), EmitOMPTargetDirectiveOutlinedFunction(), EmitOMPTargetParallelForSimdDirective(), EmitOMPTaskDirective(), EmitOMPTaskgroupDirective(), EmitOMPTeamsDirective(), EmitSEHTryStmt(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), ExitCXXTryStmt(), ExitSEHTryStmt(), GenerateBlockFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), and GenerateSEHFinallyFunction().

LValue CodeGenFunction::EmitStmtExprLValue ( const StmtExpr E)
void CodeGenFunction::EmitStopPoint ( const Stmt S)

EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.

Definition at line 38 of file CGStmt.cpp.

References Builder, and getDebugInfo().

Referenced by EmitBreakStmt(), EmitContinueStmt(), EmitCXXForRangeStmt(), EmitDeclStmt(), EmitForStmt(), EmitGotoStmt(), EmitOMPDistributeLoop(), EmitOMPSimdDirective(), EmitSEHLeaveStmt(), EmitStmt(), and EmitWhileStmt().

void CodeGenFunction::EmitStoreOfComplex ( ComplexPairTy  V,
LValue  dest,
bool  isInit 
)

EmitStoreOfComplex - Store a complex number into the specified l-value.

Definition at line 1063 of file CGExprComplex.cpp.

Referenced by EmitAtomicUpdateValue(), EmitExprAsInit(), EmitFunctionEpilog(), EmitInitStoreOfNonAggregate(), emitOMPSimpleStore(), generateObjCGetterBody(), and InitCatchParam().

void CodeGenFunction::EmitStoreOfScalar ( llvm::Value Value,
Address  Addr,
bool  Volatile,
QualType  Ty,
AlignmentSource  AlignSource = AlignmentSource::Type,
llvm::MDNode *  TBAAInfo = nullptr,
bool  isInit = false,
QualType  TBAABaseTy = QualType(),
uint64_t  TBAAOffset = 0,
bool  isNontemporal = false 
)
void CodeGenFunction::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.

The l-value must be a simple l-value. The isInit flag indicates whether this is an initialization. If so, atomic qualifiers are ignored and the store is always non-atomic.

Definition at line 1429 of file CGExpr.cpp.

References clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignmentSource(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isNontemporal(), and clang::CodeGen::LValue::isVolatile().

void CodeGenFunction::EmitStoreThroughBitfieldLValue ( RValue  Src,
LValue  Dst,
llvm::Value **  Result = nullptr 
)

EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue.

Parameters
Result[out] - If non-null, this will be set to a Value* for the bit-field contents after the store, appropriate for use as the result of an assignment to the bit-field.

Definition at line 1682 of file CGExpr.cpp.

References Builder, clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), hasBooleanRepresentation(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CGBitFieldInfo::Offset, clang::CodeGen::CGBitFieldInfo::Size, and clang::CodeGen::CGBitFieldInfo::StorageSize.

void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue ( RValue  Src,
LValue  Dst 
)
void CodeGenFunction::EmitStoreThroughGlobalRegLValue ( RValue  Src,
LValue  Dst 
)
void CodeGenFunction::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'.

Definition at line 1593 of file CGExpr.cpp.

References Builder, clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseIvarExp(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isExtVectorElt(), clang::CodeGen::LValue::isGlobalObjCRef(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isNonGC(), clang::CodeGen::LValue::isObjCIvar(), clang::CodeGen::LValue::isObjCStrong(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isThreadLocalRef(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.

Referenced by EmitAnyExprToMem(), EmitAsmStmt(), EmitAtomicUpdateValue(), EmitAutoVarInit(), EmitExprAsInit(), EmitInitializerForField(), EmitLambdaExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitOMPAtomicSimpleUpdateExpr(), emitOMPSimpleStore(), emitProxyTaskFunction(), EmitScalarInit(), emitWriteback(), GenerateOpenMPCapturedVars(), and InitCapturedStruct().

LValue CodeGenFunction::EmitStringLiteralLValue ( const StringLiteral E)

Definition at line 2274 of file CGExpr.cpp.

References clang::Expr::getType().

void CodeGenFunction::EmitSwitchStmt ( const SwitchStmt S)
void CodeGenFunction::EmitSynthesizedCXXCopyCtor ( Address  Dest,
Address  Src,
const Expr Exp 
)
void CodeGenFunction::EmitSynthesizedCXXCopyCtorCall ( const CXXConstructorDecl D,
Address  This,
Address  Src,
const CXXConstructExpr E 
)
Value * CodeGenFunction::EmitSystemZBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
Value * CodeGenFunction::EmitTargetBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)

EmitTargetBuiltinExpr - Emit the given builtin call.

Returns 0 if the call is unhandled by the current target.

Definition at line 2511 of file CGBuiltin.cpp.

References BuiltinInfo, E, EmitTargetArchBuiltinExpr(), clang::ASTContext::getAuxTargetInfo(), getContext(), getTarget(), and clang::TargetInfo::getTriple().

llvm::Value * CodeGenFunction::EmitToMemory ( llvm::Value Value,
QualType  Ty 
)

EmitToMemory - Change a scalar value from its value representation to its in-memory representation.

Definition at line 1349 of file CGExpr.cpp.

References Builder, and hasBooleanRepresentation().

Referenced by EmitNontemporalStore(), and EmitToInt().

llvm::CallInst * CodeGenFunction::EmitTrapCall ( llvm::Intrinsic::ID  IntrID)

Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified.

Definition at line 2752 of file CGExpr.cpp.

References Builder.

Referenced by GenerateCode().

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

Definition at line 2732 of file CGExpr.cpp.

References Builder.

Referenced by EmitVTablePtrCheck().

void CodeGenFunction::EmitTypeCheck ( TypeCheckKind  TCK,
SourceLocation  Loc,
llvm::Value V,
QualType  Type,
CharUnits  Alignment = CharUnits::Zero(),
bool  SkipNullCheck = false 
)
void CodeGenFunction::EmitTypeMetadataCodeForVCall ( const CXXRecordDecl RD,
llvm::Value VTable,
SourceLocation  Loc 
)
LValue CodeGenFunction::EmitUnaryOpLValue ( const UnaryOperator E)
LValue CodeGenFunction::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).

Definition at line 935 of file CGExpr.cpp.

References clang::Expr::getType(), and clang::CharUnits::One().

RValue CodeGenFunction::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).

Definition at line 929 of file CGExpr.cpp.

References clang::Expr::getType().

Address CodeGenFunction::EmitVAArg ( VAArgExpr VE,
Address VAListAddr 
)

Generate code to get an argument from the passed in pointer and update it accordingly.

Parameters
VEThe VAArgExpr for which to generate code.
VAListAddrReceives a reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef.
Returns
A pointer to the argument.

Definition at line 4133 of file CGCall.cpp.

References CGM, clang::CodeGen::ABIInfo::EmitMSVAArg(), EmitMSVAListRef(), clang::CodeGen::ABIInfo::EmitVAArg(), EmitVAListRef(), clang::CodeGen::CodeGenTypes::getABIInfo(), clang::VAArgExpr::getSubExpr(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::VAArgExpr::isMicrosoftABI().

LValue CodeGenFunction::EmitVAArgExprLValue ( const VAArgExpr E)

Definition at line 3873 of file CGExpr.cpp.

Address CodeGenFunction::EmitVAListRef ( const Expr E)
void CodeGenFunction::EmitVarAnnotations ( const VarDecl D,
llvm::Value V 
)

Emit local annotations for the local variable V, declared by D.

Definition at line 1865 of file CodeGenFunction.cpp.

References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), I, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by EmitAutoVarAlloca(), and EmitParmDecl().

void CodeGenFunction::EmitVarDecl ( const VarDecl D)
void CodeGenFunction::EmitVariablyModifiedType ( QualType  Ty)
Value * CodeGenFunction::EmitVAStartEnd ( llvm::Value ArgValue,
bool  IsStart 
)

Emits a call to an LLVM variable-argument intrinsic, either llvm.va_start or llvm.va_end.

Parameters
ArgValueA reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef.
IsStartIf true, emits a call to llvm.va_start; otherwise, calls llvm.va_end.

Definition at line 390 of file CGBuiltin.cpp.

References Builder, ID, and clang::CodeGen::Type.

Referenced by EmitX86BuiltinExpr().

void CodeGenFunction::EmitVTableAssumptionLoad ( const VPtr vptr,
Address  This 
)
void CodeGenFunction::EmitVTableAssumptionLoads ( const CXXRecordDecl ClassDecl,
Address  This 
)

Emit assumption load for all bases.

Requires to be be called only on most-derived class and not under construction of the object.

Definition at line 2282 of file CGClass.cpp.

References CGM, clang::CodeGen::CGCXXABI::doStructorsInitializeVPtrs(), EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenModule::getCXXABI(), and getVTablePointers().

Referenced by EmitCXXConstructorCall().

void CodeGenFunction::EmitVTablePtrCheck ( const CXXRecordDecl RD,
llvm::Value VTable,
CFITypeCheckKind  TCK,
SourceLocation  Loc 
)
void CodeGenFunction::EmitVTablePtrCheckForCall ( const CXXRecordDecl RD,
llvm::Value VTable,
CFITypeCheckKind  TCK,
SourceLocation  Loc 
)

EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable.

If vptr CFI is enabled, emit a check that VTable is valid.

Definition at line 2633 of file CGClass.cpp.

References EmitVTablePtrCheck(), clang::SanitizerSet::has(), LeastDerivedClassWithSameLayout(), and SanOpts.

Referenced by EmitCXXMemberOrOperatorMemberCallExpr(), and EmitTypeMetadataCodeForVCall().

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

If T is a polymorphic class type, emit a check that the virtual table for Derived belongs to a class derived from T.

Definition at line 2643 of file CGClass.cpp.

References Builder, clang::frontend::CPlusPlus, createBasicBlock(), EmitBlock(), EmitVTablePtrCheck(), clang::Type::getAs(), getLangOpts(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), GetVTablePtr(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), LeastDerivedClassWithSameLayout(), and SanOpts.

llvm::Value * CodeGenFunction::EmitVTableTypeCheckedLoad ( const CXXRecordDecl RD,
llvm::Value VTable,
uint64_t  VTableByteOffset 
)
Value * CodeGenFunction::EmitWebAssemblyBuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
void CodeGenFunction::EmitWhileStmt ( const WhileStmt S,
ArrayRef< const Attr * >  Attrs = None 
)
Value * CodeGenFunction::EmitX86BuiltinExpr ( unsigned  BuiltinID,
const CallExpr E 
)
void clang::CodeGen::CodeGenFunction::enableDebugInfo ( )
inline

Definition at line 1203 of file CodeGenFunction.h.

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

EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go.

Note that by definition, if this function creates a block then that block is unreachable; callers may do better to detect when no insertion point is defined and simply skip IR generation.

Definition at line 1641 of file CodeGenFunction.h.

References createBasicBlock(), EmitBlock(), and HaveInsertPoint().

Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitCall(), EmitCompoundStmtWithoutScope(), EmitStmt(), EmitVariablyModifiedType(), and clang::CodeGen::CodeGenFunction::StmtExprEvaluation::~StmtExprEvaluation().

void CodeGenFunction::enterByrefCleanup ( const AutoVarEmission emission)

Enter a cleanup to destroy a __block variable.

Note that this cleanup should be a no-op if the variable hasn't left the stack yet; if a cleanup is required for the variable itself, that needs to be done externally.

Definition at line 2286 of file CGBlocks.cpp.

References CGM, EHStack, clang::LangOptions::GCOnly, clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::Address::getPointer(), and clang::CodeGen::NormalAndEHCleanup.

Referenced by EmitAutoVarCleanups().

void CodeGenFunction::EnterCXXTryStmt ( const CXXTryStmt S,
bool  IsFnTryBlock = false 
)
void CodeGenFunction::EnterDtorCleanups ( const CXXDestructorDecl DD,
CXXDtorType  DtorType 
)
void clang::CodeGen::CodeGenFunction::enterFullExpression ( const ExprWithCleanups E)
inline
void CodeGenFunction::enterNonTrivialFullExpression ( const ExprWithCleanups E)

Enter a full-expression with a non-trivial number of objects to clean up.

This is in this file because, at the moment, the only kind of cleanup object is a BlockDecl*.

Definition at line 642 of file CGBlocks.cpp.

References enterBlockScope(), clang::ExprWithCleanups::getNumObjects(), and clang::ExprWithCleanups::getObjects().

Referenced by enterFullExpression().

void CodeGenFunction::EnterSEHTryStmt ( const SEHTryStmt S)
void CodeGenFunction::ErrorUnsupported ( const Stmt S,
const char *  Type 
)

ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.

Definition at line 1383 of file CodeGenFunction.cpp.

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

llvm::Value * CodeGenFunction::EvaluateExprAsBool ( const Expr E)
void CodeGenFunction::ExitCXXTryStmt ( const CXXTryStmt S,
bool  IsFnTryBlock = false 
)
void CodeGenFunction::ExitSEHTryStmt ( const SEHTryStmt S)
void CodeGenFunction::FinishFunction ( SourceLocation  EndLoc = SourceLocation())

FinishFunction - Complete IR generation of the current function.

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

Definition at line 274 of file CodeGenFunction.cpp.

References AllocaInsertPt, Builder, CGM, clang::CodeGen::EHScopeStack::containsOnlyLifetimeMarkers(), CurCodeDecl, CurFnInfo, E, EHResumeBlock, EHStack, EmitBlock(), EmitEndEHSpec(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitIfUsed(), EmitReturnBlock(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::CodeGen::CodeGenModule::getModule(), I, PopCleanupBlocks(), PrologueCleanupDepth, ReturnBlock, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().

Referenced by createAtExitStub(), createOffloadingBinaryDescriptorFunction(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitDestructorsFunction(), EmitMustTailThunk(), emitProxyTaskFunction(), emitReductionFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::emitThreadPrivateVarDefinition(), FinishThunk(), GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), GenerateObjCSetter(), GenerateOpenMPCapturedStmtFunction(), GenerateSEHFilterFunction(), and GenerateSEHFinallyFunction().

void CodeGenFunction::FinishThunk ( )

Definition at line 245 of file CGVTables.cpp.

References CurCodeDecl, CurFuncDecl, and FinishFunction().

Referenced by EmitCallAndReturnForThunk().

llvm::Function * CodeGenFunction::GenerateBlockFunction ( GlobalDecl  GD,
const CGBlockInfo Info,
const DeclMapTy ldm,
bool  IsLambdaConversionToBlock 
)

Definition at line 1148 of file CGBlocks.cpp.

References clang::CodeGen::CodeGenTypes::arrangeBlockFunctionDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), BlockInfo, BlockPointer, Builder, clang::BlockDecl::captures(), clang::BlockDecl::capturesCXXThis(), CGM, clang::Create(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurGD, clang::CodeGen::CGBlockInfo::CXXThisIndex, clang::CodeGen::CGBlockInfo::CXXThisOffset, EmitLambdaBlockInvokeBody(), EmitStmt(), FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CodeGenModule::getBlockMangledName(), clang::BlockDecl::getBody(), clang::BlockExpr::getBody(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CGBlockInfo::Capture::getConstant(), clang::CodeGen::CodeGenModule::getContext(), getContext(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::BlockExpr::getFunctionType(), clang::BlockExpr::getLocEnd(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, incrementProfileCounter(), clang::InternalLinkage, clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::codegenoptions::LimitedDebugInfo, LoadBlockStruct(), clang::BlockDecl::param_begin(), clang::BlockDecl::param_end(), clang::CodeGen::CodeGenModule::ReturnSlotInterferesWithArgs(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::CodeGen::CGBlockInfo::UsesStret, and clang::ASTContext::VoidPtrTy.

Referenced by EmitBlockLiteral(), and clang::CodeGen::CodeGenModule::GetAddrOfGlobalBlock().

Address CodeGenFunction::GenerateCapturedStmtArgument ( const CapturedStmt S)
llvm::Function * CodeGenFunction::GenerateCapturedStmtFunction ( const CapturedStmt S)

Creates the outlined function for a CapturedStmt.

Definition at line 2195 of file CGStmt.cpp.

References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), Builder, CapturedStmtInfo, CGM, clang::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitLoadOfLValue(), EmitLValueForField(), clang::CodeGen::ExtInfo, clang::RecordDecl::fields(), FinishFunction(), GetAddrOfLocalVar(), clang::CapturedDecl::getBody(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CapturedDecl::getContextParam(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getContextValue(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getHelperName(), clang::CapturedStmt::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getThisFieldDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::InternalLinkage, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::isCXXThisExprCaptured(), clang::CapturedDecl::isNothrow(), MakeNaturalAlignAddrLValue(), clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::setContextValue(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().

Referenced by EmitCapturedStmt().

void CodeGenFunction::GenerateCode ( GlobalDecl  GD,
llvm::Function *  Fn,
const CGFunctionInfo FnInfo 
)
llvm::Constant * CodeGenFunction::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'.

Note that this copies an entire block closure object to the heap; it should not be confused with a 'byref copy helper', which moves the contents of an individual __block variable to the heap.

Definition at line 1331 of file CGBlocks.cpp.

References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::BLOCK_FIELD_IS_BLOCK, clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_OBJECT, clang::CodeGen::BLOCK_FIELD_IS_WEAK, clang::CodeGen::CGBlockInfo::BlockAlign, Builder, clang::BlockDecl::captures(), CGM, clang::FunctionDecl::Create(), clang::Create(), clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), EmitARCCopyWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitNounwindRuntimeCall(), EmitRuntimeCallOrInvoke(), EmitSynthesizedCXXCopyCtor(), FinishFunction(), clang::IdentifierTable::get(), GetAddrOfLocalVar(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CodeGenModule::getBlockObjectAssign(), clang::ASTContext::getBlockVarCopyInits(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CGBlockInfo::Capture::getOffset(), clang::CodeGen::Address::getPointer(), clang::QualType::getQualifiers(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::InternalLinkage, isBlockPointer(), clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::Type, clang::ast_matchers::type, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.

Referenced by buildCopyHelper().

void CodeGenFunction::GenerateCXXGlobalDtorsFunc ( llvm::Function *  Fn,
const std::vector< std::pair< llvm::WeakVH, llvm::Constant * > > &  DtorsAndObjects 
)
void CodeGenFunction::GenerateCXXGlobalInitFunc ( llvm::Function *  Fn,
ArrayRef< llvm::Function * >  CXXThreadLocals,
Address  Guard = Address::invalid() 
)
void CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc ( llvm::Function *  Fn,
const VarDecl D,
llvm::GlobalVariable *  Addr,
bool  PerformInit 
)
llvm::Function * CodeGenFunction::generateDestroyHelper ( Address  addr,
QualType  type,
Destroyer destroyer,
bool  useEHCleanupForArray,
const VarDecl VD 
)
llvm::Constant * CodeGenFunction::GenerateDestroyHelperFunction ( const CGBlockInfo blockInfo)

Generate the destroy-helper function for a block closure object: static void block_destroy_helper(block_t *theBlock);.

Note that this destroys a heap-allocated block closure object; it should not be confused with a 'byref destroy helper', which destroys the heap-allocated contents of an individual __block variable.

Definition at line 1510 of file CGBlocks.cpp.

References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::BLOCK_FIELD_IS_BLOCK, clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_OBJECT, clang::CodeGen::BLOCK_FIELD_IS_WEAK, clang::CodeGen::CGBlockInfo::BlockAlign, BuildBlockRelease(), Builder, clang::BlockDecl::captures(), CGM, clang::FunctionDecl::Create(), clang::Create(), clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::IdentifierTable::get(), GetAddrOfLocalVar(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CGBlockInfo::Capture::getOffset(), clang::QualType::getQualifiers(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Qualifiers::hasObjCLifetime(), clang::ASTContext::Idents, clang::InternalLinkage, clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, PushDestructorCleanup(), clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::Type, clang::ast_matchers::type, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.

Referenced by buildDisposeHelper().

llvm::Constant * CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction ( const ObjCPropertyImplDecl PID)

Definition at line 3244 of file CGObjC.cpp.

References clang::QualType::addConst(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::frontend::CPlusPlus, clang::CXXConstructExpr::Create(), clang::FunctionDecl::Create(), clang::Create(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitAnyExpr(), FinishFunction(), clang::CodeGen::AggValueSlot::forAddr(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicGetterHelperFnMap(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getTranslationUnitDecl(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialGetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isRecordType(), clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicGetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.

Referenced by GenerateObjCGetter().

llvm::Constant * CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction ( const ObjCPropertyImplDecl PID)

GenerateObjCAtomicSetterCopyHelperFunction - Given a c++ object type with non-trivial copy assignment function, produce following helper function.

static void copyHelper(Ty *dest, const Ty *source) { *dest = *source; }

Definition at line 3165 of file CGObjC.cpp.

References clang::QualType::addConst(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::frontend::CPlusPlus, clang::FunctionDecl::Create(), clang::Create(), EmitStmt(), FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicSetterHelperFnMap(), clang::CallExpr::getCallee(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialSetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::Type::isRecordType(), clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicSetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.

Referenced by GenerateObjCSetter().

void CodeGenFunction::GenerateObjCCtorDtorMethod ( ObjCImplementationDecl IMP,
ObjCMethodDecl MD,
bool  ctor 
)
void CodeGenFunction::GenerateObjCGetter ( ObjCImplementationDecl IMP,
const ObjCPropertyImplDecl PID 
)

GenerateObjCGetter - Synthesize an Objective-C property getter function.

Generate an Objective-C property getter function.

The given Decl must be an ObjCImplementationDecl. @synthesize is illegal within a category.

Definition at line 795 of file CGObjC.cpp.

References FinishFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), generateObjCGetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::ObjCPropertyImplDecl::getPropertyDecl(), and StartObjCMethod().

void CodeGenFunction::generateObjCGetterBody ( const ObjCImplementationDecl classImpl,
const ObjCPropertyImplDecl propImpl,
const ObjCMethodDecl GetterMothodDecl,
llvm::Constant *  AtomicHelperFn 
)

Definition at line 863 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), AutoreleaseResult, clang::ASTContext::BoolTy, Builder, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitAggregateCopy(), EmitARCLoadWeak(), emitARCRetainLoadOfScalar(), EmitCall(), emitCPPObjectAtomicGetterCall(), EmitIvarOffset(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForIvar(), EmitReturnStmt(), EmitStoreOfComplex(), emitStructGetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getEvaluationKind(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), clang::ObjCPropertyDecl::getGetterMethodDecl(), getLangOpts(), getLLVMContext(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::Address::getPointer(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::CGObjCRuntime::GetPropertyGetFunction(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::LValue::getQuals(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::ObjCPropertyDecl::getType(), getTypes(), hasTrivialGetExpr(), clang::Type::isReferenceType(), LoadObjCSelf(), MakeAddrLValue(), clang::Qualifiers::OCL_Weak, ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::ASTContext::toBits(), clang::CodeGen::Type, TypeOfSelfObject(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.

Referenced by GenerateObjCGetter().

void CodeGenFunction::GenerateObjCMethod ( const ObjCMethodDecl OMD)

Generate an Objective-C method.

An Objective-C method is a C function with its pointer, name, and types registered in the class struture.

Definition at line 558 of file CGObjC.cpp.

References clang::CodeGen::CodeGenPGO::assignRegionCounters(), CurFn, EmitCompoundStmtWithoutScope(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::ObjCMethodDecl::getClassInterface(), incrementProfileCounter(), and StartObjCMethod().

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

void CodeGenFunction::GenerateObjCSetter ( ObjCImplementationDecl IMP,
const ObjCPropertyImplDecl PID 
)

GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.

Generate an Objective-C property setter function.

The given Decl must be an ObjCImplementationDecl. @synthesize is illegal within a category.

Definition at line 1321 of file CGObjC.cpp.

References FinishFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyDecl::getSetterMethodDecl(), and StartObjCMethod().

void CodeGenFunction::generateObjCSetterBody ( const ObjCImplementationDecl classImpl,
const ObjCPropertyImplDecl propImpl,
llvm::Constant *  AtomicHelperFn 
)

Definition at line 1145 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), clang::ASTContext::BoolTy, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitCall(), emitCPPObjectAtomicSetterCall(), EmitIvarOffset(), EmitLValueForIvar(), EmitStmt(), emitStructSetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), getLLVMContext(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetOptimizedPropertySetFunction(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::CGObjCRuntime::GetPropertySetFunction(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ObjCPropertyDecl::getSetterMethodDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), getTypes(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), hasTrivialSetExpr(), LoadObjCSelf(), clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::ObjCMethodDecl::param_begin(), clang::CodeGen::Type, TypeOfSelfObject(), UseOptimizedSetter(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by GenerateObjCSetter().

llvm::Function * CodeGenFunction::GenerateOpenMPCapturedStmtFunction ( const CapturedStmt S)

Definition at line 198 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), CapturedStmtInfo, clang::CapturedStmt::captures(), clang::Type::castAs(), castValueFromUintptr(), CGM, clang::ImplicitParamDecl::Create(), clang::Create(), clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitLoadOfLValue(), EmitLoadOfReference(), clang::CodeGen::ExtInfo, clang::RecordDecl::fields(), FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CapturedDecl::getBody(), clang::CapturedStmt::getCapturedDecl(), clang::CapturedStmt::getCapturedRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CapturedDecl::getContextParamPosition(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getHelperName(), clang::NamedDecl::getIdentifier(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::Address::getPointer(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getVariableArrayDecayedType(), I, clang::ASTContext::Idents, clang::InternalLinkage, clang::Type::isAnyPointerType(), clang::CapturedDecl::isNothrow(), clang::Type::isReferenceType(), clang::Type::isVariablyModifiedType(), MakeAddrLValue(), clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().

Referenced by emitOutlinedOrderedFunction().

void CodeGenFunction::GenerateOpenMPCapturedVars ( const CapturedStmt S,
SmallVectorImpl< llvm::Value * > &  CapturedVars 
)
llvm::Function * CodeGenFunction::GenerateSEHFilterFunction ( CodeGenFunction ParentCGF,
const SEHExceptStmt Except 
)

Create a stub filter function that will ultimately hold the code of the filter expression.

The EH preparation passes in LLVM will outline the code from the main function body into this stub.

Definition at line 1689 of file CGException.cpp.

References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateStore(), CurFn, EmitScalarExpr(), FinishFunction(), getContext(), clang::SEHExceptStmt::getFilterExpr(), clang::Expr::getType(), clang::Type::isSignedIntegerType(), ReturnValue, and startOutlinedSEHHelper().

Referenced by EnterSEHTryStmt().

llvm::Function * CodeGenFunction::GenerateSEHFinallyFunction ( CodeGenFunction ParentCGF,
const SEHFinallyStmt Finally 
)
void CodeGenFunction::generateThunk ( llvm::Function *  Fn,
const CGFunctionInfo FnInfo,
GlobalDecl  GD,
const ThunkInfo Thunk 
)
llvm::Function * CodeGenFunction::GenerateVarArgsThunk ( llvm::Function *  Fn,
const CGFunctionInfo FnInfo,
GlobalDecl  GD,
const ThunkInfo Thunk 
)
unsigned CodeGenFunction::getAccessedFieldNo ( unsigned  Idx,
const llvm::Constant *  Elts 
)
static

getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.

Definition at line 507 of file CGExpr.cpp.

Address CodeGenFunction::GetAddressOfBaseClass ( Address  Value,
const CXXRecordDecl Derived,
CastExpr::path_const_iterator  PathBegin,
CastExpr::path_const_iterator  PathEnd,
bool  NullCheckValue,
SourceLocation  Loc 
)
Address CodeGenFunction::GetAddressOfDerivedClass ( Address  Value,
const CXXRecordDecl Derived,
CastExpr::path_const_iterator  PathBegin,
CastExpr::path_const_iterator  PathEnd,
bool  NullCheckValue 
)
Address CodeGenFunction::GetAddressOfDirectBaseInCompleteClass ( Address  This,
const CXXRecordDecl Derived,
const CXXRecordDecl Base,
bool  BaseIsVirtual 
)

GetAddressOfBaseOfCompleteClass - Convert the given pointer to a complete class to the given direct base.

Gets the address of a direct base class within a complete object.

This should only be used for (1) non-virtual bases or (2) virtual bases when the type is known to be complete (e.g. in complete destructors).

The object pointed to by 'This' is assumed to be non-null.

Definition at line 197 of file CGClass.cpp.

References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::CodeGen::Address::getElementType(), clang::ASTRecordLayout::getVBaseClassOffset(), and clang::CodeGen::CodeGenTypeCache::Int8Ty.

Referenced by EmitBaseInitializer().

Address CodeGenFunction::GetAddrOfBlockDecl ( const VarDecl var,
bool  ByRef 
)
llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel ( const LabelDecl L)
Address clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar ( const VarDecl VD)
inline
CleanupKind clang::CodeGen::CodeGenFunction::getARCCleanupKind ( )
inline

Retrieves the default cleanup kind for an ARC cleanup.

Except under -fobjc-arc-eh, ARC cleanups are normal-only.

Definition at line 2957 of file CodeGenFunction.h.

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

Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitObjCConsumeObject(), EmitParmDecl(), pushTemporaryCleanup(), and StartObjCMethod().

const BlockByrefInfo & CodeGenFunction::getBlockByrefInfo ( const VarDecl D)
CleanupKind clang::CodeGen::CodeGenFunction::getCleanupKind ( QualType::DestructionKind  kind)
inline
ASTContext& clang::CodeGen::CodeGenFunction::getContext ( ) const
inline

Definition at line 1196 of file CodeGenFunction.h.

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

Referenced by AddDirectArgument(), BuildFunctionArgList(), clang::CodeGen::CGCXXABI::buildThisParam(), CanDevirtualizeMemberFunctionCall(), CanSkipVTablePointerInitialization(), castToBase(), castValueFromUintptr(), CheckAggExprForMemSetUse(), commonEmitCXXMemberOrOperatorCall(), ConstantFoldsToSimpleInteger(), ConvertType(), CreateIRTemp(), CreateMemTemp(), createReferenceTemporary(), EmitAArch64BuiltinExpr(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), emitAddrOfImagComponent(), emitAddrOfVarFromArray(), EmitAggMemberInitializer(), EmitAggregateCopy(), emitAlignedClause(), EmitARMBuiltinExpr(), EmitArrayDelete(), emitArrayLength(), emitArraySubscriptGEP(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAtomicExpr(), EmitAtomicStore(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBinaryAtomicPost(), EmitBlockCallExpr(), EmitBlockCopyAndAutorelease(), EmitBlockLiteral(), EmitBuiltinNewDeleteCall(), emitByrefStructureInit(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallArg(), EmitCallArgs(), EmitCapturedFieldLValue(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCommonNeonBuiltinExpr(), EmitCompoundStmt(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXConstructorCall(), EmitCXXDeleteExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXTypeidExpr(), EmitDeclInvariant(), EmitDeleteCall(), emitDestroy(), EmitEndEHSpec(), clang::CodeGen::emitForNext(), EmitFunctionDeclLValue(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitInheritedCXXConstructorCall(), EmitInitializerForField(), EmitLambdaBlockInvokeBody(), EmitLambdaDelegatingInvokeBody(), EmitMemberInitializer(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCBoxedExpr(), EmitObjCForCollectionStmt(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), emitOffloadingArrays(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), EmitOMPReductionClauseInit(), EmitOMPTaskBasedDirective(), EmitOMPTaskDirective(), EmitOMPTaskLoopBasedDirective(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), emitPrivatesInit(), emitReductionFunction(), EmitReturnStmt(), EmitSEHExceptionCodeSave(), EmitStartEHSpec(), EmitStaticVarDecl(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtor(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZBuiltinExpr(), EmitTargetBuiltinExpr(), clang::CodeGen::emitThreadIDAddress(), EmitTypeCheck(), clang::CodeGen::emitUpdateLocation(), EmitVAListRef(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), EmitX86_64VAArgFromMemory(), EmitX86BuiltinExpr(), EnterSEHTryStmt(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), forConstantArrayExpansion(), GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCopyHelperFunction(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateOpenMPCapturedStmtFunction(), GenerateOpenMPCapturedVars(), GenerateSEHFilterFunction(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getBlockByrefInfo(), getItaniumDynamicCastFn(), getNaturalTypeAlignment(), GetNumNonZeroBytesInInit(), getRangeForType(), getTypeSize(), getVLASize(), getVTablePointers(), GetVTTParameter(), InitCapturedStruct(), isCheapEnoughToEvaluateUnconditionally(), loadToBegin(), LookupNeonLLVMIntrinsic(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), MakeNaturalAlignAddrLValue(), performTypeAdjustment(), ShouldEmitVTableTypeCheckedLoad(), StartFunction(), startOutlinedSEHHelper(), StartThunk(), and TypeOfSelfObject().

uint64_t clang::CodeGen::CodeGenFunction::getCurrentProfileCount ( )
inline

Get the profiler's current count.

This is generally the count for the most recently incremented counter.

Definition at line 999 of file CodeGenFunction.h.

Referenced by EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitDoStmt(), and EmitObjCForCollectionStmt().

CGDebugInfo* clang::CodeGen::CodeGenFunction::getDebugInfo ( )
inline
CodeGenFunction::Destroyer * CodeGenFunction::getDestroyer ( QualType::DestructionKind  destructionKind)
llvm::BasicBlock * CodeGenFunction::getEHDispatchBlock ( EHScopeStack::stable_iterator  scope)
llvm::BasicBlock * CodeGenFunction::getEHResumeBlock ( bool  isCleanup)
Address CodeGenFunction::getEHSelectorSlot ( )
TypeEvaluationKind CodeGenFunction::getEvaluationKind ( QualType  T)
static
llvm::Value * CodeGenFunction::getExceptionFromSlot ( )
Address CodeGenFunction::getExceptionSlot ( )

Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.

Definition at line 383 of file CGException.cpp.

References CreateTempAlloca(), ExceptionSlot, clang::CodeGen::CodeGenTypeCache::getPointerAlign(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by EmitLandingPad(), and getExceptionFromSlot().

llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock ( )
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::getInvokeDest ( )
inline
llvm::BasicBlock * CodeGenFunction::getInvokeDestImpl ( )
CodeGenFunction::JumpDest CodeGenFunction::getJumpDestForLabel ( const LabelDecl S)

getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.

Definition at line 452 of file CGStmt.cpp.

References createBasicBlock(), clang::NamedDecl::getName(), clang::CodeGen::EHScopeStack::stable_iterator::invalid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), and NextCleanupDestIndex.

Referenced by EmitGotoStmt(), EmitIndirectGotoStmt(), and GetAddrOfLabel().

JumpDest clang::CodeGen::CodeGenFunction::getJumpDestInCurrentScope ( llvm::BasicBlock *  Target)
inline
JumpDest clang::CodeGen::CodeGenFunction::getJumpDestInCurrentScope ( StringRef  Name = StringRef())
inline

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.

Definition at line 709 of file CodeGenFunction.h.

References createBasicBlock(), getJumpDestInCurrentScope(), and clang::Name.

const LangOptions& clang::CodeGen::CodeGenFunction::getLangOpts ( ) const
inline
llvm::LLVMContext& clang::CodeGen::CodeGenFunction::getLLVMContext ( )
inline
llvm::BasicBlock * CodeGenFunction::getMSVCDispatchBlock ( EHScopeStack::stable_iterator  scope)
CharUnits CodeGenFunction::getNaturalPointeeTypeAlignment ( QualType  T,
AlignmentSource Source = nullptr 
)

Definition at line 99 of file CodeGenFunction.cpp.

References getNaturalTypeAlignment(), and clang::Type::getPointeeType().

Referenced by EmitNVPTXBuiltinExpr().

CharUnits CodeGenFunction::getNaturalTypeAlignment ( QualType  T,
AlignmentSource Source = nullptr,
bool  forPointeeType = false 
)
Address CodeGenFunction::getNormalCleanupDestSlot ( )

Definition at line 1215 of file CGCleanup.cpp.

References Builder, and clang::CharUnits::fromQuantity().

Referenced by ResolveAllBranchFixups(), and TransitionToCleanupSwitch().

CodeGenFunction::JumpDest CodeGenFunction::getOMPCancelDestination ( OpenMPDirectiveKind  Kind)
const LValue& clang::CodeGen::CodeGenFunction::getOpaqueLValueMapping ( const OpaqueValueExpr e)
inline

getOpaqueLValueMapping - Given an opaque value expression (which must be mapped to an l-value), return its mapping.

Definition at line 1827 of file CodeGenFunction.h.

References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().

const RValue& clang::CodeGen::CodeGenFunction::getOpaqueRValueMapping ( const OpaqueValueExpr e)
inline

getOpaqueRValueMapping - Given an opaque value expression (which must be mapped to an r-value), return its mapping.

Definition at line 1838 of file CodeGenFunction.h.

References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().

uint64_t clang::CodeGen::CodeGenFunction::getProfileCount ( const Stmt S)
inline
llvm::Value * CodeGenFunction::getSelectorFromSlot ( )
const TargetInfo& clang::CodeGen::CodeGenFunction::getTarget ( ) const
inline
llvm::BasicBlock * CodeGenFunction::getTerminateHandler ( )
llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad ( )
CodeGenTypes& clang::CodeGen::CodeGenFunction::getTypes ( ) const
inline
llvm::Value * CodeGenFunction::getTypeSize ( QualType  Ty)
RValue CodeGenFunction::GetUndefRValue ( QualType  Ty)

GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.

Definition at line 903 of file CGExpr.cpp.

References clang::Type::castAs(), clang::ComplexType::getElementType(), clang::Type::isVoidType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.

Referenced by EmitCall().

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::getUnreachableBlock ( )
inline
std::pair< llvm::Value *, QualType > CodeGenFunction::getVLASize ( 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.

Assumes that the type has already been emitted with EmitVariablyModifiedType.

Definition at line 1641 of file CodeGenFunction.cpp.

References Builder, getContext(), clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by emitArrayLength(), EmitAutoVarAlloca(), EmitNullInitialization(), emitPointerArithmetic(), getArrayIndexingBound(), getTypeSize(), and getVLASize().

std::pair< llvm::Value *, QualType > CodeGenFunction::getVLASize ( QualType  vla)
CodeGenFunction::VPtrsVector CodeGenFunction::getVTablePointers ( const CXXRecordDecl VTableClass)
void CodeGenFunction::getVTablePointers ( BaseSubobject  Base,
const CXXRecordDecl NearestVBase,
CharUnits  OffsetFromNearestVBase,
bool  BaseIsNonVirtualPrimaryBase,
const CXXRecordDecl VTableClass,
VisitedVirtualBasesSetTy VBases,
VPtrsVector vptrs 
)
llvm::Value * CodeGenFunction::GetVTablePtr ( Address  This,
llvm::Type VTableTy,
const CXXRecordDecl VTableClass 
)
llvm::Value * CodeGenFunction::GetVTTParameter ( GlobalDecl  GD,
bool  ForVirtualBase,
bool  Delegating 
)

GetVTTParameter - Return the VTT parameter that should be passed to a base constructor/destructor with virtual bases.

FIXME: VTTs are Itanium ABI-specific, so the definition should move to ItaniumCXXABI.cpp together with all the references to VTT.

Definition at line 425 of file CGClass.cpp.

References Builder, CGM, CurCodeDecl, CurGD, clang::CodeGen::CodeGenVTables::GetAddrOfVTT(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenVTables::getSubVTTIndex(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CodeGenModule::getVTables(), LoadCXXVTT(), and clang::CodeGen::CGCXXABI::NeedsVTTParameter().

static bool clang::CodeGen::CodeGenFunction::hasAggregateEvaluationKind ( QualType  T)
inlinestatic
static bool clang::CodeGen::CodeGenFunction::hasScalarEvaluationKind ( QualType  T)
inlinestatic
bool clang::CodeGen::CodeGenFunction::hasVolatileMember ( QualType  T)
inline

hasVolatileMember - returns true if aggregate type has a volatile member.

Definition at line 1784 of file CodeGenFunction.h.

References clang::Type::getAs(), and clang::RecordDecl::hasVolatileMember().

Referenced by EmitAggregateAssign(), and LValueIsSuitableForInlineAtomic().

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

HaveInsertPoint - True if an insertion point is defined.

If not, this indicates that the current code being emitted is unreachable.

Definition at line 1633 of file CodeGenFunction.h.

References Builder.

Referenced by CleanupTy::Emit(), emitAlignedClause(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), clang::CodeGen::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBreakStmt(), EmitCall(), clang::CodeGen::emitCancelCall(), clang::CodeGen::emitCancellationPointCall(), EmitCleanup(), EmitContinueStmt(), clang::CodeGen::emitCriticalRegion(), EmitDeclStmt(), clang::CodeGen::emitDoacrossInit(), clang::CodeGen::emitForDispatchInit(), clang::CodeGen::emitForOrderedIterationEnd(), clang::CodeGen::emitForStaticFinish(), emitForStaticInitCall(), EmitGotoStmt(), clang::CodeGen::emitInlinedDirective(), clang::CodeGen::emitMasterRegion(), clang::CodeGen::emitNumThreadsClause(), EmitOMPCopyinClause(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClause(), EmitOMPLinearClauseFinal(), EmitOMPLinearClauseInit(), EmitOMPPrivateClause(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseFinal(), EmitOMPReductionClauseInit(), clang::CodeGen::emitOrderedRegion(), emitPostUpdateForReductionClause(), emitPreCond(), clang::CodeGen::emitProcBindClause(), EmitSEHLeaveStmt(), emitSimdlenSafelenClause(), EmitStmt(), clang::CodeGen::emitTargetDataCalls(), clang::CodeGen::emitTargetDataStandAloneCall(), clang::CodeGen::emitTaskCall(), clang::CodeGen::emitTaskgroupRegion(), clang::CodeGen::emitTaskLoopCall(), clang::CodeGen::emitTaskwaitCall(), clang::CodeGen::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), EnsureInsertPoint(), enterBlockScope(), ExitCXXTryStmt(), ExitSEHTryStmt(), and protectFromPeepholes().

void clang::CodeGen::CodeGenFunction::incrementProfileCounter ( const Stmt S)
inline
LValue CodeGenFunction::InitCapturedStruct ( const CapturedStmt S)
void CodeGenFunction::initFullExprCleanup ( )
void CodeGenFunction::InitializeVTablePointer ( const VPtr vptr)
void CodeGenFunction::InitializeVTablePointers ( const CXXRecordDecl ClassDecl)
void CodeGenFunction::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.

The address should be something that was returned from one of the CreateTempAlloca or CreateMemTemp routines, and the initializer must be valid in the entry block (i.e. it must either be a constant or an argument value).

Definition at line 85 of file CGExpr.cpp.

References AllocaInsertPt, clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getPointer(), and clang::CharUnits::getQuantity().

Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall().

void CodeGenFunction::InsertHelper ( llvm::Instruction *  I,
const llvm::Twine &  Name,
llvm::BasicBlock *  BB,
llvm::BasicBlock::iterator  InsertPt 
) const

CGBuilder insert helper.

This function is called after an instruction is created using Builder.

Definition at line 1908 of file CodeGenFunction.cpp.

References CGM, clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::CodeGen::LoopInfoStack::InsertHelper(), IsSanitizerScope, and LoopStack.

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

Returns true while emitting a cleanuppad.

Definition at line 398 of file CodeGenFunction.h.

References CurrentFuncletPad.

Referenced by EmitCall().

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

isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.

Definition at line 761 of file CodeGenFunction.h.

Referenced by EnterNewDeleteCleanup(), pushCleanupAfterFullExpr(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), setBeforeOutermostConditional(), and SetupCleanupBlockActivation().

static bool clang::CodeGen::CodeGenFunction::isObjCMethodWithTypeParams ( const ObjCMethodDecl method)
inlinestatic

Definition at line 3294 of file CodeGenFunction.h.

Referenced by EmitCallArgs().

template<typename T >
static bool clang::CodeGen::CodeGenFunction::isObjCMethodWithTypeParams ( const T *  )
inlinestatic

Definition at line 3308 of file CodeGenFunction.h.

bool CodeGenFunction::isObviouslyBranchWithoutCleanups ( JumpDest  Dest) const

isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run.

'false' is always a conservatively correct answer for this method.

Definition at line 972 of file CGCleanup.cpp.

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

Referenced by EmitCaseStmt().

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

Returns true inside SEH __try blocks.

Definition at line 395 of file CodeGenFunction.h.

References SEHTryEpilogueStack.

Referenced by EmitCall(), and EmitSEHLeaveStmt().

bool CodeGenFunction::isTrivialInitializer ( const Expr Init)

Determine whether the given initializer is trivial in the sense that it requires no code to be generated.

Definition at line 1164 of file CGDecl.cpp.

Referenced by AllTrivialInitializers(), checkInitIsRequired(), EmitAutoVarInit(), EmitOMPFirstprivateClause(), and emitPrivatesInit().

Address CodeGenFunction::LoadBlockStruct ( )
llvm::Value* clang::CodeGen::CodeGenFunction::LoadCXXThis ( )
inline

LoadCXXThis - Load the value of 'this'.

This function is only valid while generating code for an C++ member function.

Definition at line 1898 of file CodeGenFunction.h.

Referenced by EmitAsanPrologueOrEpilogue(), EmitBlockLiteral(), EmitCallAndReturnForThunk(), EmitCtorPrologue(), EmitDestructorBody(), EmitMemberInitializer(), and LoadCXXThisAddress().

Address CodeGenFunction::LoadCXXThisAddress ( )
llvm::Value* clang::CodeGen::CodeGenFunction::LoadCXXVTT ( )
inline

LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.

Definition at line 1908 of file CodeGenFunction.h.

Referenced by GetVTTParameter().

llvm::Value * CodeGenFunction::LoadObjCSelf ( )
Function * CodeGenFunction::LookupNeonLLVMIntrinsic ( unsigned  IntrinsicID,
unsigned  Modifier,
llvm::Type ArgTy,
const CallExpr E 
)
bool CodeGenFunction::LValueIsSuitableForInlineAtomic ( LValue  LV)

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.

Definition at line 1271 of file CGAtomic.cpp.

References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::LValue::getType(), clang::ASTContext::getTypeSize(), getTypeSize(), hasVolatileMember(), and clang::CodeGen::LValue::isVolatile().

LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue ( Address  Addr,
QualType  T,
AlignmentSource  AlignSource = AlignmentSource::Type 
)
inline
LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue ( llvm::Value V,
QualType  T,
CharUnits  Alignment,
AlignmentSource  AlignSource = AlignmentSource::Type 
)
inline
LValue CodeGenFunction::MakeNaturalAlignAddrLValue ( llvm::Value V,
QualType  T 
)
LValue CodeGenFunction::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.

Definition at line 155 of file CodeGenFunction.cpp.

References getNaturalTypeAlignment(), and MakeAddrLValue().

bool clang::CodeGen::CodeGenFunction::needsEHCleanup ( QualType::DestructionKind  kind)
inline
void CodeGenFunction::popCatchScope ( )

popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves).

Definition at line 996 of file CGException.cpp.

References clang::CodeGen::EHScopeStack::begin(), EHStack, emitCatchDispatchBlock(), clang::CodeGen::EHScope::hasEHBranches(), and clang::CodeGen::EHScopeStack::popCatch().

Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().

void CodeGenFunction::PopCleanupBlock ( bool  FallthroughIsBranchThrough = false)
void CodeGenFunction::PopCleanupBlocks ( EHScopeStack::stable_iterator  OldCleanupStackSize)

Takes the old cleanup stack size and emits the cleanup blocks that have been added.

Pops cleanup blocks until the given savepoint is reached.

Definition at line 421 of file CGCleanup.cpp.

References clang::CodeGen::EHCleanupScope(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().

Referenced by FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::~RunCleanupsScope().

void CodeGenFunction::PopCleanupBlocks ( EHScopeStack::stable_iterator  Old,
size_t  OldLifetimeExtendedSize 
)

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.

Pops cleanup blocks until the given savepoint is reached, then add the cleanups from the given savepoint in the lifetime-extended cleanups stack.

Definition at line 440 of file CGCleanup.cpp.

References E, clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getKind(), clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getSize(), and I.

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

Pass the result to unprotectFromPeepholes to declare that protection is no longer required.

There's no particular reason why this shouldn't apply to l-values, it's just that no existing peepholes work on pointers.

Definition at line 1826 of file CodeGenFunction.cpp.

References Builder, clang::CodeGen::RValue::getScalarVal(), HaveInsertPoint(), and clang::CodeGen::RValue::isScalar().

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind().

void CodeGenFunction::pushCallObjectDeleteCleanup ( const FunctionDecl OperatorDelete,
llvm::Value CompletePtr,
QualType  ElementType 
)

Definition at line 1537 of file CGExprCXX.cpp.

References EHStack, and clang::CodeGen::NormalAndEHCleanup.

template<class T , class... As>
void clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExpr ( CleanupKind  Kind,
As...  A 
)
inline
void CodeGenFunction::pushDestroy ( QualType::DestructionKind  dtorKind,
Address  addr,
QualType  type 
)

pushDestroy - Push the standard destructor for the given type as at least a normal cleanup.

Definition at line 1454 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup, getCleanupKind(), and getDestroyer().

Referenced by EmitAutoVarWithLifetime(), emitDestructorsFunction(), EmitParmDecl(), enterBlockScope(), pushEHDestroy(), and pushTemporaryCleanup().

void CodeGenFunction::pushDestroy ( CleanupKind  kind,
Address  addr,
QualType  type,
Destroyer destroyer,
bool  useEHCleanupForArray 
)

Definition at line 1463 of file CGDecl.cpp.

References clang::ast_matchers::type.

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

Does nothing if T is not a C++ class type with a non-trivial destructor.

Definition at line 2421 of file CGClass.cpp.

References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getDestructor(), and clang::CXXRecordDecl::hasTrivialDestructor().

Referenced by GenerateDestroyHelperFunction(), and pushCleanupAfterFullExpr().

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

Definition at line 2416 of file CGClass.cpp.

References EHStack, and clang::CodeGen::NormalAndEHCleanup.

void CodeGenFunction::pushEHDestroy ( QualType::DestructionKind  dtorKind,
Address  addr,
QualType  type 
)

pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup.

Definition at line 1444 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup, getDestroyer(), needsEHCleanup(), and pushDestroy().

Referenced by EmitInitializerForField(), and EmitMemberInitializer().

template<class T , class... As>
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup ( CleanupKind  kind,
As...  A 
)
inline

pushFullExprCleanup - Push a cleanup to be run at the end of the current full-expression.

Safe against the possibility that we're currently inside a conditionally-evaluated expression.

Definition at line 406 of file CodeGenFunction.h.

References EHStack, initFullExprCleanup(), isInConditionalBranch(), clang::CodeGen::EHScopeStack::pushCleanupTuple(), and saveValueInCond().

void CodeGenFunction::pushIrregularPartialArrayCleanup ( llvm::Value arrayBegin,
Address  arrayEndPointer,
QualType  elementType,
CharUnits  elementAlign,
Destroyer destroyer 
)

pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array.

The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.

Parameters
elementType- the immediate element type of the array; possibly still an array type

Definition at line 1682 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup.

Referenced by EmitNewArrayInitializer().

void CodeGenFunction::pushLifetimeExtendedDestroy ( CleanupKind  kind,
Address  addr,
QualType  type,
Destroyer destroyer,
bool  useEHCleanupForArray 
)
void CodeGenFunction::pushRegularPartialArrayCleanup ( llvm::Value arrayBegin,
llvm::Value arrayEnd,
QualType  elementType,
CharUnits  elementAlign,
Destroyer destroyer 
)

pushRegularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array.

The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.

Parameters
elementType- the immediate element type of the array; possibly still an array type

Definition at line 1699 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup.

Referenced by emitArrayDestroy(), EmitCXXAggrConstructorCall(), and EmitNewArrayInitializer().

void CodeGenFunction::pushStackRestore ( CleanupKind  kind,
Address  SPMem 
)

Definition at line 1470 of file CGDecl.cpp.

References EHStack.

Referenced by EmitAutoVarAlloca().

Address CodeGenFunction::recoverAddrOfEscapedLocal ( CodeGenFunction ParentCGF,
Address  ParentVar,
llvm::Value ParentFP 
)

Recovers the address of a local in a parent function.

ParentVar is the address of the variable used in the immediate parent function. It can either be an alloca or a call to llvm.localrecover if there are nested outlined functions. ParentFP is the frame pointer of the outermost parent frame.

Definition at line 1496 of file CGException.cpp.

References AllocaInsertPt, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), CurFn, clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::Address::getName(), clang::CodeGen::Address::getPointer(), clang::CodeGen::Address::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by EmitCapturedLocals(), and EmitSEHExceptionCodeSave().

void CodeGenFunction::registerGlobalDtorWithAtExit ( const VarDecl D,
llvm::Constant *  fn,
llvm::Constant *  addr 
)

Call atexit() with a function that passes the given argument to the given function.

Register a global destructor using the C atexit runtime function.

Definition at line 227 of file CGDeclCXX.cpp.

References CGM, createAtExitStub(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), and clang::CodeGen::CodeGenTypeCache::IntTy.

void CodeGenFunction::ResolveBranchFixups ( llvm::BasicBlock *  Target)
bool CodeGenFunction::sanitizePerformTypeCheck ( ) const

Whether any type-checking sanitizers are enabled.

If false, calls to EmitTypeCheck can be skipped.

Definition at line 525 of file CGExpr.cpp.

References clang::SanitizerSet::has(), and SanOpts.

Referenced by EmitReferenceBindingToExpr(), EmitTypeCheck(), and GetAddressOfBaseClass().

template<class T >
DominatingValue<T>::saved_type clang::CodeGen::CodeGenFunction::saveValueInCond ( value)
inline

Definition at line 362 of file CodeGenFunction.h.

References clang::CodeGen::InvariantValue< T >::save().

Referenced by pushFullExprCleanup().

void clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional ( llvm::Value value,
Address  addr 
)
inline
void CodeGenFunction::setBlockContextParameter ( const ImplicitParamDecl D,
unsigned  argNum,
llvm::Value ptr 
)
void clang::CodeGen::CodeGenFunction::setCurrentProfileCount ( uint64_t  Count)
inline

Set the profiler's current count.

Definition at line 993 of file CodeGenFunction.h.

Referenced by EmitBlockWithFallThrough(), and EmitBranchOnBoolExpr().

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

Definition at line 4171 of file CGExpr.cpp.

References Node.

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

This is generally true when both vcall CFI and whole-program-vtables are enabled.

Definition at line 2772 of file CGClass.cpp.

References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::NamedDecl::getQualifiedNameAsString(), clang::ASTContext::getSanitizerBlacklist(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), clang::SanitizerBlacklist::isBlacklistedType(), clang::CodeGenOptions::SanitizeTrap, and SanOpts.

bool CodeGenFunction::ShouldInstrumentFunction ( )

ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.

Definition at line 392 of file CodeGenFunction.cpp.

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

Referenced by FinishFunction(), and StartFunction().

bool CodeGenFunction::ShouldNullCheckClassCastValue ( const CastExpr Cast)
static
bool clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls ( )
inline
bool CodeGenFunction::ShouldXRayInstrumentFunction ( ) const

ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds.

Definition at line 402 of file CodeGenFunction.cpp.

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

Referenced by StartFunction().

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

SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it.

This assumes that no other code could potentially reference the basic block.

Definition at line 375 of file CGStmt.cpp.

References EHStack, and clang::CodeGen::EHScopeStack::empty().

Referenced by EmitDoStmt(), and EmitWhileStmt().

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

Parameters
LocThe location to be associated with the function.
StartLocThe location of the function body.

Definition at line 653 of file CodeGenFunction.cpp.

References AllocaInsertPt, AutoreleaseResult, Builder, clang::CC_C, CGM, clang::SanitizerSet::clear(), clang::frontend::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), CreateIRTemp(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, CurSEHParent, EHStack, EmitFunctionInstrumentation(), EmitFunctionProlog(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitLoadOfLValue(), EmitLValueForLambdaField(), EmitMCountInstrumentation(), EmitStartEHSpec(), EmitVariablyModifiedType(), endsWithReturn(), clang::RecordDecl::fields(), FnRetTy, clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAs(), clang::CXXRecordDecl::getCaptureFields(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::ASTContext::getFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), getJumpDestInCurrentScope(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::ValueDecl::getType(), clang::CodeGen::TargetCodeGenInfo::getUBSanFunctionSignature(), clang::SanitizerSet::has(), clang::SanitizerSet::hasOneOf(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::Address::invalid(), clang::FunctionDecl::isInlined(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::CXXRecordDecl::isLambda(), clang::FunctionDecl::isMain(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LambdaCaptureFields, LambdaThisCaptureField, clang::SanitizerSet::Mask, clang::CodeGenOptions::OnlyHintInlining, PrologueCleanupDepth, clang::Redeclarable< decl_type >::redecls(), ReturnBlock, ReturnValue, SanOpts, ShouldInstrumentFunction(), ShouldXRayInstrumentFunction(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::FunctionDecl::usesSEHTry().

Referenced by createAtExitStub(), createOffloadingBinaryDescriptorFunction(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitDestructorsFunction(), emitProxyTaskFunction(), emitReductionFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::emitThreadPrivateVarDefinition(), GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateOpenMPCapturedStmtFunction(), StartObjCMethod(), startOutlinedSEHHelper(), and StartThunk().

void CodeGenFunction::StartObjCMethod ( const ObjCMethodDecl OMD,
const ObjCContainerDecl CD 
)
void CodeGenFunction::startOutlinedSEHHelper ( CodeGenFunction ParentCGF,
bool  IsFilter,
const Stmt OutlinedStmt 
)
void CodeGenFunction::StartThunk ( llvm::Function *  Fn,
GlobalDecl  GD,
const CGFunctionInfo FnInfo 
)
CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant ( DeclRefExpr refExpr)

Try to emit a reference to the given value without producing it as an l-value.

This is actually more than an optimization: we can't produce an l-value for variables that we never actually captured in a block or lambda, which means const int variables or constexpr literals or similar.

Definition at line 1135 of file CGExpr.cpp.

References CEK_AsReferenceOnly, CEK_AsValueOnly, CEK_None, checkVarTypeForConstantEmission(), clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::DeclRefExpr::getDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::EvalStatus::HasSideEffects, and clang::Expr::EvalResult::Val.

QualType CodeGenFunction::TypeOfSelfObject ( )
void CodeGenFunction::unprotectFromPeepholes ( PeepholeProtection  protection)
Value * CodeGenFunction::vectorWrapScalar16 ( llvm::Value Op)

Friends And Related Function Documentation

friend class CGCXXABI
friend

Definition at line 109 of file CodeGenFunction.h.

Member Data Documentation

llvm::AssertingVH<llvm::Instruction> clang::CodeGen::CodeGenFunction::AllocaInsertPt

AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas.

Definition at line 174 of file CodeGenFunction.h.

Referenced by CreateTempAlloca(), EmitCapturedLocals(), clang::CodeGen::emitUpdateLocation(), FinishFunction(), clang::CodeGen::getThreadID(), InitTempAlloca(), recoverAddrOfEscapedLocal(), and StartFunction().

bool clang::CodeGen::CodeGenFunction::AutoreleaseResult

In ARC, whether we should autorelease the return value.

Definition at line 277 of file CodeGenFunction.h.

Referenced by EmitCallAndReturnForThunk(), EmitFunctionEpilog(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().

const CodeGen::CGBlockInfo* clang::CodeGen::CodeGenFunction::BlockInfo
llvm::Value* clang::CodeGen::CodeGenFunction::BlockPointer
CGBuilderTy clang::CodeGen::CodeGenFunction::Builder

Definition at line 141 of file CodeGenFunction.h.

Referenced by AddDirectArgument(), AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), AdjustObjCObjectType(), clang::CodeGen::CallArgList::allocateArgumentMemory(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), BuildBlockRelease(), BuildVector(), castToBase(), CheckAggExprForMemSetUse(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createIdentFieldGEP(), createPlaceholderSlot(), EmitAArch64BuiltinExpr(), EmitAArch64CompareBuiltinExpr(), EmitAArch64TblBuiltinExpr(), emitAddressAtOffset(), emitAddrOfFieldStorage(), emitAddrOfImagComponent(), emitAddrOfRealComponent(), emitAddrOfVarFromArray(), EmitAggMemberInitializer(), EmitAggregateCopy(), EmitAlignmentAssumption(), EmitAMDGPUBuiltinExpr(), EmitAnnotationCall(), EmitAnyExprToExn(), emitARCCopyOperation(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCInitWeak(), emitARCLoadOperation(), emitARCOperationAfterCall(), EmitARCRelease(), EmitARCRetainAutorelease(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), EmitARMBuiltinExpr(), EmitArrayDelete(), emitArrayDestroy(), emitArrayLength(), emitArraySubscriptGEP(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), EmitAtomicStore(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarInit(), clang::CodeGen::emitBarrierCall(), EmitBinaryAtomicPost(), emitBinaryBuiltin(), EmitBitCastOfLValueToProperType(), EmitBlock(), EmitBlockAfterUses(), emitBlockByrefAddress(), EmitBlockCallExpr(), EmitBlockLiteral(), EmitBranch(), EmitBranchOnBoolExpr(), emitByrefStructureInit(), EmitCall(), EmitCallArg(), EmitCallArgs(), EmitCallOrInvoke(), clang::CodeGen::emitCancellationPointCall(), EmitCapturedLocals(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastToVoidPtr(), emitCatchDispatchBlock(), emitCatchPadBlock(), emitCheckHandlerCall(), EmitCleanup(), EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), emitCopyprivateCopyFunction(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::emitCriticalRegion(), EmitCtorPrologue(), EmitCUDADevicePrintfCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXTypeidExpr(), EmitDeclInvariant(), EmitDelegateCallArg(), EmitDeleteCall(), emitDestroy(), EmitDestructorBody(), clang::CodeGen::emitDoacrossInit(), EmitDoStmt(), EmitDynamicCast(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryFooter(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitEntryHeader(), EmitExtendGCLifetime(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), clang::CodeGen::emitForDispatchInit(), emitForStaticInitCall(), EmitForStmt(), emitFPIntBuiltin(), EmitFromInt(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitFunctionProlog(), EmitIndirectGotoStmt(), EmitInitializerForField(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitLandingPad(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), emitMergePHI(), EmitMustTailThunk(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNeonSplat(), EmitNewArrayInitializer(), EmitNonNullArgCheck(), EmitNontemporalStore(), emitNonZeroVLAInit(), EmitNoreturnRuntimeCallOrInvoke(), EmitNullBaseClassInitialization(), EmitNullInitialization(), emitNumTeamsClauseForTargetDirective(), clang::CodeGen::emitNumThreadsClause(), EmitNVPTXBuiltinExpr(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolStmt(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCMessageExpr(), emitOffloadingArrays(), emitOffloadingArraysArgument(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), emitOMPAtomicRMW(), EmitOMPCopyinClause(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPReductionClauseInit(), EmitOverflowIntrinsic(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), emitPostUpdateForReductionClause(), EmitPPCBuiltinExpr(), emitPrivatesInit(), emitProxyTaskFunction(), emitRangedBuiltin(), emitReductionFunction(), EmitReturnBlock(), EmitReturnStmt(), emitRoundPointerUpToAlignment(), EmitSanitizerStatReport(), EmitSEHAbnormalTermination(), EmitSEHExceptionCode(), EmitSEHExceptionCodeSave(), EmitSEHLeaveStmt(), EmitSignBit(), EmitSpecialRegisterBuiltin(), EmitStmt(), EmitStopPoint(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), clang::CodeGen::emitTaskCall(), clang::CodeGen::emitTaskInit(), clang::CodeGen::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), emitTernaryBuiltin(), clang::CodeGen::CGCXXABI::EmitThisParam(), emitThreadLimitClauseForTargetDirective(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::emitThreadPrivateVarDefinition(), clang::CodeGen::emitThreadPrivateVarInit(), EmitToInt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), emitUnaryBuiltin(), clang::CodeGen::emitUpdateLocation(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVariablyModifiedType(), emitVoidPtrDirectVAArg(), emitVoidPtrVAArg(), EmitVTableAssumptionLoad(), EmitVTablePtrCheck(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), EmitWebAssemblyBuiltinExpr(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), EmitX86BuiltinExpr(), EmitX86MaskedCompare(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86Select(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), findDominatingStoreToReturnValue(), FinishFunction(), forConstantArrayExpansion(), clang::CodeGen::CallArgList::freeArgumentMemory(), GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateDestroyHelperFunction(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateSEHFilterFunction(), GenerateVarArgsThunk(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), GetAddrOfBlockDecl(), clang::CodeGen::getAddrOfThreadPrivate(), getArrayIndexingBound(), getEHResumeBlock(), getExceptionFromSlot(), getMaskVecValue(), getMSVCDispatchBlock(), getSelectorFromSlot(), getTerminateHandler(), getTerminateLandingPad(), clang::CodeGen::getThreadID(), getTypeSize(), getVLASize(), GetVTablePtr(), GetVTTParameter(), HaveInsertPoint(), incrementProfileCounter(), InitCatchParam(), initFullExprCleanup(), InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), loadToBegin(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), packTBLDVectorList(), PerformReturnAdjustment(), performTypeAdjustment(), PPC64_initDwarfEHRegSizeTable(), protectFromPeepholes(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), recoverAddrOfEscapedLocal(), ResolveAllBranchFixups(), clang::CodeGen::DominatingLLVMValue::restore(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), SetupCleanupBlockActivation(), SimplifyCleanupEntry(), StartFunction(), tryEmitARCCopyWeakInit(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), vectorWrapScalar16(), clang::CodeGen::ApplyDebugLocation::~ApplyDebugLocation(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().

CGCapturedStmtInfo* clang::CodeGen::CodeGenFunction::CapturedStmtInfo
CodeGenModule& clang::CodeGen::CodeGenFunction::CGM

Definition at line 136 of file CodeGenFunction.h.

Referenced by AddInitializerToStaticVarDecl(), clang::CodeGen::CallArgList::allocateArgumentMemory(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), BuildBlockRelease(), buildFMulAdd(), BuildFunctionArgList(), CalculateCookiePadding(), CallBeginCatch(), canEmitDelegateCallArgs(), checkTargetFeatures(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), ConvertType(), ConvertTypeForMem(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), CreateDefaultAlignTempAlloca(), createReferenceTemporary(), CreateTempAllocaForCoercion(), EmitAArch64BuiltinExpr(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), EmitAggregateCopy(), EmitAlignmentAssumption(), EmitAMDGPUBuiltinExpr(), EmitAnnotationCall(), emitARCCopyOperation(), emitARCLoadOperation(), emitARCStoreOperation(), emitARCValueOperation(), EmitARMBuiltinExpr(), EmitArrayDelete(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAtomicExpr(), emitAtomicLibcall(), EmitAtomicStore(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), emitBinaryBuiltin(), EmitBlockCallExpr(), EmitBlockLiteral(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), emitByrefStructureInit(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallArg(), EmitCallArgs(), EmitCallOrInvoke(), EmitCapturedStmt(), EmitCaseStmt(), emitCatchDispatchBlock(), emitCheckHandlerCall(), EmitCommonNeonBuiltinExpr(), emitCommonOMPParallelDirective(), emitCommonOMPTeamsDirective(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCtorPrologue(), EmitCUDADevicePrintfCallExpr(), EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXForRangeStmt(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXMemberCallExpr(), EmitCXXMemberDataPointerAddress(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefExprDbgValue(), EmitDelegateCallArg(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), EmitEndEHSpec(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), EmitForStmt(), EmitForwardingCallToLambda(), emitFPIntBuiltin(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), EmitGlobalVarDeclLValue(), EmitInheritedCXXConstructorCall(), emitInitWithReductionInitializer(), EmitInlinedInheritingCXXConstructorCall(), EmitLambdaStaticInvokeFunction(), EmitLambdaToBlockPointerBody(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitMaterializeTemporaryExpr(), EmitMCountInstrumentation(), EmitMemberInitializer(), EmitMustTailThunk(), EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitNVPTXBuiltinExpr(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCMessageExpr(), EmitObjCProtocolExpr(), EmitObjCSelectorExpr(), EmitObjCStringLiteral(), EmitObjectDelete(), emitOffloadingArrays(), emitOffloadingArraysArgument(), EmitOMPAtomicCaptureExpr(), EmitOMPAtomicDirective(), EmitOMPAtomicReadExpr(), emitOMPAtomicRMW(), EmitOMPAtomicUpdateExpr(), EmitOMPAtomicWriteExpr(), EmitOMPBarrierDirective(), EmitOMPCancelDirective(), EmitOMPCancellationPointDirective(), EmitOMPCopyinClause(), EmitOMPCriticalDirective(), EmitOMPDistributeDirective(), EmitOMPDistributeLoop(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPFlushDirective(), EmitOMPForDirective(), EmitOMPForSimdDirective(), EmitOMPMasterDirective(), EmitOMPOrderedDirective(), EmitOMPParallelDirective(), EmitOMPReductionClauseFinal(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdDirective(), EmitOMPSingleDirective(), EmitOMPTargetDataDirective(), EmitOMPTargetDirective(), EmitOMPTargetEnterDataDirective(), EmitOMPTargetExitDataDirective(), EmitOMPTargetParallelForSimdDirective(), EmitOMPTargetUpdateDirective(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopBasedDirective(), EmitOMPTaskwaitDirective(), EmitOMPTaskyieldDirective(), EmitOverflowIntrinsic(), EmitParmDecl(), emitPointerArithmetic(), EmitPPCBuiltinExpr(), emitRangedBuiltin(), emitReductionCombiner(), emitRTtypeidCall(), EmitSanitizerStatReport(), EmitSignBit(), EmitSpecialRegisterBuiltin(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStmt(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), emitTernaryBuiltin(), EmitThreadPrivateVarDeclLValue(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), emitUnaryBuiltin(), clang::CodeGen::emitUpdateLocation(), EmitVAArg(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVarDecl(), emitVoidPtrDirectVAArg(), EmitVTableAssumptionLoad(), EmitVTableAssumptionLoads(), EmitVTablePtrCheck(), EmitVTableTypeCheckedLoad(), EmitWebAssemblyBuiltinExpr(), EmitWhileStmt(), emitWritebackArg(), EmitX86BuiltinExpr(), enterBlockScope(), enterByrefCleanup(), EnterCXXTryStmt(), EnterDtorCleanups(), EnterStructPointerForCoercedAccess(), ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), ExitCXXTryStmt(), FinishFunction(), clang::CodeGen::CallArgList::freeArgumentMemory(), GenerateBlockFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateOpenMPCapturedStmtFunction(), generateThunk(), GenerateVarArgsThunk(), clang::CodeGen::EHPersonality::get(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getARCCleanupKind(), getAsmSrcLocInfo(), getBadCastFn(), getBadTypeidFn(), getBlockByrefInfo(), getContext(), getEHResumeBlock(), getInvokeDestImpl(), getItaniumDynamicCastFn(), getLangOpts(), getLLVMContext(), getNaturalTypeAlignment(), getTerminateHandler(), getTerminateLandingPad(), getTypes(), getTypeSize(), GetVTablePtr(), GetVTTParameter(), incrementProfileCounter(), InitCatchParam(), InitializeVTablePointer(), InitializeVTablePointers(), InsertHelper(), LoadCXXThisAddress(), LookupNeonLLVMIntrinsic(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), needsEHCleanup(), packTBLDVectorList(), PerformReturnAdjustment(), pushTemporaryCleanup(), registerGlobalDtorWithAtExit(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), ShouldEmitVTableTypeCheckedLoad(), ShouldInstrumentFunction(), shouldUseFusedARCCalls(), ShouldXRayInstrumentFunction(), StartFunction(), StartObjCMethod(), StartThunk(), tryEmitFMulAdd(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), and ~CodeGenFunction().

const Decl* clang::CodeGen::CodeGenFunction::CurCodeDecl
llvm::Function* clang::CodeGen::CodeGenFunction::CurFn
const CGFunctionInfo* clang::CodeGen::CodeGenFunction::CurFnInfo
const Decl* clang::CodeGen::CodeGenFunction::CurFuncDecl
bool clang::CodeGen::CodeGenFunction::CurFuncIsThunk

In C++, whether we are code generating a thunk.

This controls whether we should emit cleanups.

Definition at line 274 of file CodeGenFunction.h.

Referenced by EmitParmDecl(), and StartThunk().

GlobalDecl clang::CodeGen::CodeGenFunction::CurGD
llvm::Instruction* clang::CodeGen::CodeGenFunction::CurrentFuncletPad = nullptr
const FunctionDecl* clang::CodeGen::CodeGenFunction::CurSEHParent = nullptr
void CodeGenFunction::destroyARCStrongImprecise
static
void CodeGenFunction::destroyARCStrongPrecise
static

Definition at line 3008 of file CodeGenFunction.h.

Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().

void CodeGenFunction::destroyARCWeak
static

Definition at line 3009 of file CodeGenFunction.h.

Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().

void CodeGenFunction::destroyCXXObject
static
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock

EHResumeBlock - Unified block containing a call to llvm.eh.resume.

Definition at line 338 of file CodeGenFunction.h.

Referenced by FinishFunction(), and getEHResumeBlock().

llvm::AllocaInst* clang::CodeGen::CodeGenFunction::EHSelectorSlot

The selector slot.

Under the MandatoryCleanup model, all landing pads write the current selector value into this alloca.

Definition at line 346 of file CodeGenFunction.h.

Referenced by getEHSelectorSlot().

EHScopeStack clang::CodeGen::CodeGenFunction::EHStack

Definition at line 299 of file CodeGenFunction.h.

Referenced by CallBeginCatch(), EmitAnyExprToExn(), EmitArrayDelete(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), EmitCallArg(), emitCXXDestructMethod(), EmitCXXNewExpr(), EmitDelegatingCXXConstructorCall(), clang::CodeGen::emitDoacrossInit(), EmitEndEHSpec(), EmitFunctionProlog(), EmitLabel(), EmitLandingPad(), EmitNewArrayInitializer(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolStmt(), EmitObjectDelete(), EmitParmDecl(), EmitStartEHSpec(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), enterByrefCleanup(), EnterCXXTryStmt(), EnterDtorCleanups(), EnterNewDeleteCleanup(), EnterSEHTryStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), FinishFunction(), getEHDispatchBlock(), getInvokeDest(), getInvokeDestImpl(), getJumpDestInCurrentScope(), getMSVCDispatchBlock(), InitCatchParam(), initFullExprCleanup(), clang::CodeGen::RegionCodeGenTy::operator()(), popCatchScope(), pushCallObjectDeleteCleanup(), PushDestructorCleanup(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), pushStackRestore(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), clang::CodeGen::CodeGenFunction::LexicalScope::rescopeLabels(), ResolveAllBranchFixups(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), and StartObjCMethod().

llvm::Value* clang::CodeGen::CodeGenFunction::ExceptionSlot

The exception slot.

All landing pads write the current exception pointer into this alloca.

Definition at line 342 of file CodeGenFunction.h.

Referenced by getExceptionSlot().

CGBlockInfo* clang::CodeGen::CodeGenFunction::FirstBlockInfo

FirstBlockInfo - The head of a singly-linked-list of block layouts.

Definition at line 335 of file CodeGenFunction.h.

Referenced by EmitBlockLiteral(), enterBlockScope(), and ~CodeGenFunction().

QualType clang::CodeGen::CodeGenFunction::FnRetTy
bool clang::CodeGen::CodeGenFunction::IsOutlinedSEHHelper

True if the current function is an outlined SEH helper.

This can be a finally block or filter expression.

Definition at line 287 of file CodeGenFunction.h.

Referenced by EmitReturnStmt(), and startOutlinedSEHHelper().

bool clang::CodeGen::CodeGenFunction::IsSanitizerScope

True if CodeGen currently emits code implementing sanitizer checks.

Definition at line 262 of file CodeGenFunction.h.

Referenced by InsertHelper(), and clang::CodeGen::CodeGenFunction::SanitizerScope::SanitizerScope().

llvm::DenseMap<const VarDecl *, FieldDecl *> clang::CodeGen::CodeGenFunction::LambdaCaptureFields

Definition at line 292 of file CodeGenFunction.h.

Referenced by StartFunction().

FieldDecl* clang::CodeGen::CodeGenFunction::LambdaThisCaptureField

Definition at line 293 of file CodeGenFunction.h.

Referenced by StartFunction().

llvm::SmallVector<char, 256> clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupStack
LoopInfoStack clang::CodeGen::CodeGenFunction::LoopStack
unsigned clang::CodeGen::CodeGenFunction::NextCleanupDestIndex

Definition at line 332 of file CodeGenFunction.h.

Referenced by getJumpDestForLabel(), and getJumpDestInCurrentScope().

llvm::AllocaInst* clang::CodeGen::CodeGenFunction::NormalCleanupDest

i32s containing the indexes of the cleanup destinations.

Definition at line 330 of file CodeGenFunction.h.

Referenced by destroyOptimisticNormalEntry().

llvm::DenseMap<const VarDecl *, llvm::Value *> clang::CodeGen::CodeGenFunction::NRVOFlags

A mapping from NRVO variables to the flags used to indicate when the NRVO has been applied to this variable.

Definition at line 297 of file CodeGenFunction.h.

Referenced by EmitAutoVarAlloca(), and EmitReturnStmt().

SmallVector<llvm::Value*, 8> clang::CodeGen::CodeGenFunction::ObjCEHValueStack

ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows.

Definition at line 369 of file CodeGenFunction.h.

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

EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::PrologueCleanupDepth

PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.

Definition at line 163 of file CodeGenFunction.h.

Referenced by FinishFunction(), and StartFunction().

JumpDest clang::CodeGen::CodeGenFunction::ReturnBlock

ReturnBlock - Unified return block.

Definition at line 166 of file CodeGenFunction.h.

Referenced by EmitForwardingCallToLambda(), EmitReturnBlock(), EmitReturnStmt(), FinishFunction(), getOMPCancelDestination(), and StartFunction().

Address clang::CodeGen::CodeGenFunction::ReturnValue
SanitizerSet clang::CodeGen::CodeGenFunction::SanOpts
bool clang::CodeGen::CodeGenFunction::SawAsmBlock

Whether we processed a Microsoft-style asm block during CodeGen.

These can potentially set the return value.

Definition at line 281 of file CodeGenFunction.h.

Referenced by EmitAsmStmt(), and GenerateCode().

SmallVector<Address, 1> clang::CodeGen::CodeGenFunction::SEHCodeSlotStack

A stack of exception code slots.

Entering an __except block pushes a slot on the stack and leaving pops one. The __exception_code() intrinsic loads a value from the top of the stack.

Definition at line 351 of file CodeGenFunction.h.

Referenced by EmitCapturedLocals(), EmitSEHExceptionCode(), EmitSEHExceptionCodeSave(), EnterSEHTryStmt(), and ExitSEHTryStmt().

llvm::Value* clang::CodeGen::CodeGenFunction::SEHInfo = nullptr

Value returned by __exception_info intrinsic.

Definition at line 354 of file CodeGenFunction.h.

Referenced by EmitSEHExceptionCodeSave(), and EmitSEHExceptionInfo().

llvm::SmallVector<const JumpDest *, 2> clang::CodeGen::CodeGenFunction::SEHTryEpilogueStack

Definition at line 301 of file CodeGenFunction.h.

Referenced by EmitSEHLeaveStmt(), EmitSEHTryStmt(), and isSEHTryScope().

const TargetInfo& clang::CodeGen::CodeGenFunction::Target

Definition at line 137 of file CodeGenFunction.h.

Referenced by EmitIndirectGotoStmt(), and getTarget().


The documentation for this class was generated from the following files: