clang API Documentation
#include <CodeGenFunction.h>
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code.
Definition at line 111 of file CodeGenFunction.h.
typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy |
Definition at line 145 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, llvm::Value *addr, QualType ty) |
Definition at line 1119 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address) |
Definition at line 1837 of file CodeGenFunction.h.
typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> clang::CodeGen::CodeGenFunction::VisitedVirtualBasesSetTy |
Definition at line 1312 of file CodeGenFunction.h.
Situations in which we might emit a check for the suitability of a pointer or glvalue.
Definition at line 1761 of file CodeGenFunction.h.
CodeGenFunction::CodeGenFunction | ( | CodeGenModule & | cgm, |
bool | suppressNewContext = false |
||
) |
Definition at line 36 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CGCXXABI::getMangleContext(), and clang::MangleContext::startNewFunction().
Definition at line 69 of file CodeGenFunction.cpp.
References CGM, destroyBlockInfos(), FirstBlockInfo, getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and LifetimeExtendedCleanupStack.
void CodeGenFunction::ActivateCleanupBlock | ( | EHScopeStack::stable_iterator | Cleanup, |
llvm::Instruction * | DominatingIP | ||
) |
Activate a cleanup that was created in an inactivated state.
ActivateCleanupBlock - Activates an initially-inactive cleanup. Cannot be used to resurrect a deactivated cleanup.
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 1099 of file CGCleanup.cpp.
References ForActivation, and SetupCleanupBlockActivation().
Referenced by 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 273 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().
void clang::CodeGen::CodeGenFunction::AllocateBlockCXXThisPointer | ( | const CXXThisExpr * | E | ) |
void clang::CodeGen::CodeGenFunction::AllocateBlockDecl | ( | const DeclRefExpr * | E | ) |
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 279 of file CGCXX.cpp.
References BuildAppleKextVirtualDestructorCall(), clang::Dtor_Complete, clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::RecordType::getDecl(), clang::NestedNameSpecifier::getKind(), and clang::NestedNameSpecifier::TypeSpec.
Referenced by BuildAppleKextVirtualDestructorCall(), and EmitCXXMemberCallExpr().
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 300 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), BuildAppleKextVirtualCall(), CGM, clang::CodeGen::Complete, clang::Dtor_Base, clang::CodeGen::CodeGenTypes::GetFunctionType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by BuildAppleKextVirtualCall().
llvm::Value * CodeGenFunction::BuildBlockByrefAddress | ( | llvm::Value * | BaseAddr, |
const VarDecl * | V | ||
) |
BuildBlockByrefAddress - Computes address location of the variable which is declared as __block.
Definition at line 1998 of file CGBlocks.cpp.
References Builder, and clang::NamedDecl::getNameAsString().
Referenced by drillIntoBlockVariable(), and EmitDeclRefLValue().
void CodeGenFunction::BuildBlockRelease | ( | llvm::Value * | DeclPtr, |
BlockFieldFlags | flags | ||
) |
Definition at line 2217 of file CGBlocks.cpp.
References clang::CodeGen::BLOCK_FIELD_IS_BYREF, BuildBlockRelease(), Builder, clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by BuildBlockRelease().
llvm::Type * CodeGenFunction::BuildByRefType | ( | const VarDecl * | D | ) |
BuildByRefType - This routine changes a __block variable declared as T x into:
struct { void *__isa; void *__forwarding; int32_t __flags; int32_t __size; void *__copy_helper; // only if needed void *__destroy_helper; // only if needed void *__byref_variable_layout;// only if needed char padding[X]; // only if needed T x; } x
void *__copy_helper;
void *__destroy_helper;
void *__byref_variable_layout;
Definition at line 2022 of file CGBlocks.cpp.
References clang::ASTContext::BlockRequiresCopying(), clang::serialized_diags::create(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::NamedDecl::getNameAsString(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTarget(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::Int8Ty.
Referenced by EmitAutoVarAlloca().
llvm::Constant* clang::CodeGen::CodeGenFunction::BuildDescriptorBlockDecl | ( | const BlockExpr * | , |
const CGBlockInfo & | Info, | ||
llvm::StructType * | , | ||
llvm::Constant * | BlockVarLayout | ||
) |
llvm::Value * CodeGenFunction::BuildVector | ( | ArrayRef< llvm::Value * > | Ops | ) |
Definition at line 5731 of file CGBuiltin.cpp.
References Builder.
bool CodeGenFunction::CanDevirtualizeMemberFunctionCall | ( | const Expr * | Base, |
const CXXMethodDecl * | MD | ||
) |
CanDevirtualizeMemberFunctionCalls - Checks whether virtual calls on given expr can be devirtualized.
Definition at line 2102 of file CGClass.cpp.
References clang::Expr::getBestDynamicClassType(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::CXXMethodDecl::getParent(), clang::Decl::hasAttr(), and skipNoOpCastsAndParens().
Referenced by EmitCXXMemberCallExpr(), and EmitCXXOperatorMemberCallee().
bool CodeGenFunction::ConstantFoldsToSimpleInteger | ( | const Expr * | Cond, |
bool & | ResultBool | ||
) |
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 984 of file CodeGenFunction.cpp.
Referenced by EmitBranchOnBoolExpr(), EmitConditionalOperatorLValue(), EmitIfStmt(), EmitOMPIfClause(), and EmitSwitchStmt().
bool CodeGenFunction::ConstantFoldsToSimpleInteger | ( | const Expr * | Cond, |
llvm::APSInt & | ResultInt | ||
) |
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 998 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 959 of file CodeGenFunction.cpp.
References clang::Stmt::children().
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 927 of file CodeGenFunction.cpp.
References clang::Stmt::children().
Referenced by CollectStatementsForCase(), ConstantFoldsToSimpleInteger(), EmitAutoVarInit(), EmitConditionalOperatorLValue(), EmitIfStmt(), EmitStmt(), and FindCaseStatementsForValue().
RValue CodeGenFunction::convertTempToRValue | ( | llvm::Value * | addr, |
QualType | type, | ||
SourceLocation | loc | ||
) |
Given the address of a temporary variable, produce an r-value of its type.
Definition at line 3389 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), EmitLoadOfComplex(), EmitLoadOfScalar(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), MakeNaturalAlignAddrLValue(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAtomicExpr().
llvm::Type * CodeGenFunction::ConvertType | ( | QualType | T | ) |
Definition at line 99 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by AdjustRelatedResultType(), ConvertType(), CreateIRTemp(), EmitAggMemberInitializer(), EmitAggregateCopy(), emitArgumentDemotion(), emitArrayLength(), EmitAsmStmt(), EmitCastLValue(), EmitCommonNeonSISDBuiltinExpr(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitCXXUuidofExpr(), EmitDeleteCall(), EmitDynamicCastToNull(), EmitFunctionDeclLValue(), EmitInitializerForField(), EmitLambdaDelegatingInvokeBody(), EmitLoadOfBitfieldLValue(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCStringLiteral(), EmitStoreThroughLValue(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitUnsupportedLValue(), emitWritebackArg(), generateObjCGetterBody(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getItaniumDynamicCastFn(), GetUndefRValue(), performTypeAdjustment(), and tryEmitARCRetainScalarExpr().
llvm::Type* clang::CodeGen::CodeGenFunction::ConvertType | ( | const TypeDecl * | T | ) | [inline] |
Definition at line 1378 of file CodeGenFunction.h.
References ConvertType(), and getContext().
llvm::Type * CodeGenFunction::ConvertTypeForMem | ( | QualType | T | ) |
Definition at line 95 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by CreateMemTemp(), createPlaceholderSlot(), EmitAnyExprToExn(), EmitAsmStmt(), EmitAutoVarAlloca(), EmitCXXDeleteExpr(), EmitCXXNewExpr(), EmitDeclRefLValue(), EmitLValueForFieldInitialization(), EmitNewArrayInitializer(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), EmitParmDecl(), EmitStoreThroughBitfieldLValue(), EmitToMemory(), EmitVAArgFromMemory(), getRangeForType(), and InitCatchParam().
AggValueSlot clang::CodeGen::CodeGenFunction::CreateAggTemp | ( | QualType | T, |
const Twine & | Name = "tmp" |
||
) | [inline] |
CreateAggTemp - Create a temporary memory object for the given aggregate type.
Definition at line 1498 of file CodeGenFunction.h.
References CreateMemTemp(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::forAddr(), getContext(), clang::QualType::getQualifiers(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::AggValueSlot::IsNotAliased, and clang::CodeGen::AggValueSlot::IsNotDestructed.
Referenced by EmitAnyExpr(), EmitAnyExprToTemp(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), and EmitLambdaLValue().
llvm::Constant * CodeGenFunction::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.
Definition at line 165 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), Builder, CGM, clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), FinishFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Decl::getLocation(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getTypes(), clang::MangleContext::mangleDynamicAtExitDestructor(), StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::ASTContext::VoidTy.
Referenced by emitGlobalDtorWithTLRegDtor(), and registerGlobalDtorWithAtExit().
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 1402 of file CodeGenFunction.h.
References getLLVMContext().
Referenced by CreateNormalEntry(), EmitAggMemberInitializer(), emitArrayDestroy(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitCall(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLandingPad(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitOMPAggregateAssign(), EmitOMPIfClause(), EmitOMPInnerLoop(), EmitOMPSimdDirective(), EmitSwitchStmt(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterCXXTryStmt(), ExitCXXTryStmt(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getEHDispatchBlock(), getEHResumeBlock(), GetIndirectGotoBlock(), getJumpDestForLabel(), getJumpDestInCurrentScope(), getTerminateHandler(), getTerminateLandingPad(), getUnreachableBlock(), PerformReturnAdjustment(), and StartFunction().
AggValueSlot clang::CodeGen::CodeGenFunction::CreateInAllocaTmp | ( | QualType | T, |
const Twine & | Name = "inalloca" |
||
) |
CreateInAllocaTmp - Create a temporary memory object for the given aggregate type.
llvm::AllocaInst * 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.
Definition at line 70 of file CGExpr.cpp.
References ConvertType(), CreateTempAlloca(), getContext(), clang::CharUnits::getQuantity(), and clang::ASTContext::getTypeAlignInChars().
Referenced by StartFunction().
llvm::AllocaInst * CodeGenFunction::CreateMemTemp | ( | QualType | T, |
const Twine & | Name = "tmp" |
||
) |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignment.
Definition at line 79 of file CGExpr.cpp.
References ConvertTypeForMem(), CreateTempAlloca(), getContext(), clang::CharUnits::getQuantity(), and clang::ASTContext::getTypeAlignInChars().
Referenced by CreateAggTemp(), createReferenceTemporary(), EmitAggExprToLValue(), EmitAtomicExpr(), EmitAtomicLoad(), EmitCompoundLiteralLValue(), EmitCompoundStmtWithoutScope(), EmitExtVectorElementExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), clang::CodeGen::EmitOMPSerialCall(), clang::CodeGen::EmitThreadIDAddress(), EmitValToTemp(), GetUndefRValue(), and InitCapturedStruct().
llvm::AllocaInst * CodeGenFunction::CreateTempAlloca | ( | llvm::Type * | Ty, |
const Twine & | Name = "tmp" |
||
) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block. The caller is responsible for setting an appropriate alignment on the alloca.
CreateTempAlloca - This creates a alloca and inserts it into the entry block.
Definition at line 56 of file CGExpr.cpp.
References AllocaInsertPt, and Builder.
Referenced by clang::CodeGen::CallArgList::allocateArgumentMemory(), CreateCoercedLoad(), CreateCoercedStore(), CreateIRTemp(), CreateMemTemp(), EmitAutoVarAlloca(), EmitCheckValue(), EmitInitializerForField(), EmitNewArrayInitializer(), clang::CodeGen::EmitOpenMPUpdateLocation(), EmitParmDecl(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), getEHSelectorSlot(), getExceptionSlot(), InitCatchParam(), initFullExprCleanup(), clang::CodeGen::DominatingLLVMValue::save(), and SetupCleanupBlockActivation().
void CodeGenFunction::DeactivateCleanupBlock | ( | EHScopeStack::stable_iterator | Cleanup, |
llvm::Instruction * | DominatingIP | ||
) |
Deactive a cleanup that was created in an active state.
DeactivateCleanupBlock - Deactivates the given cleanup block. The block cannot be reactivated. Pops it if it's the top of the stack.
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 1111 of file CGCleanup.cpp.
References Builder, ForDeactivation, and SetupCleanupBlockActivation().
Referenced by deactivateArgCleanupsBeforeCall(), EmitAnyExprToExn(), EmitCXXNewExpr(), EmitNewArrayInitializer(), clang::CodeGen::CallArgList::freeArgumentMemory(), and pushCleanupAfterFullExpr().
void CodeGenFunction::destroyBlockInfos | ( | CGBlockInfo * | info | ) | [static] |
Destroy a chain of block layouts.
Definition at line 674 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::NextBlockInfo.
Referenced by ~CodeGenFunction().
void clang::CodeGen::CodeGenFunction::disableDebugInfo | ( | ) | [inline] |
Definition at line 1078 of file CodeGenFunction.h.
Referenced by EmitScalarExpr().
Value * CodeGenFunction::EmitAArch64BuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 3901 of file CGBuiltin.cpp.
References NeonIntrinsicInfo::AltLLVMIntrinsic, Builder, NeonIntrinsicInfo::BuiltinID, ceil, EmitAArch64TblBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), findNeonIntrinsicInMap(), clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, floor, fma, clang::CallExpr::getArg(), clang::CallExpr::getCallReturnType(), clang::CallExpr::getDirectCallee(), clang::NeonTypeFlags::getEltType(), clang::NamedDecl::getName(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), getValue(), clang::Expr::isIntegerConstantExpr(), clang::NeonTypeFlags::isPoly(), clang::NeonTypeFlags::isQuad(), clang::NeonTypeFlags::isUnsigned(), NeonIntrinsicInfo::LLVMIntrinsic, NeonIntrinsicInfo::NameHint, nearbyint, NULL, P, rint, round, sqrt, trunc, and NeonIntrinsicInfo::TypeModifier.
Value * CodeGenFunction::EmitAArch64CompareBuiltinExpr | ( | llvm::Value * | Op, |
llvm::Type * | Ty, | ||
const llvm::CmpInst::Predicate | Fp, | ||
const llvm::CmpInst::Predicate | Ip, | ||
const llvm::Twine & | Name = "" |
||
) |
Definition at line 3065 of file CGBuiltin.cpp.
References Builder.
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.
EmitAggExpr - Emit the computation of the specified expression of aggregate type. 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 1376 of file CGExprAgg.cpp.
References CheckAggExprForMemSetUse(), clang::CodeGen::AggValueSlot::getAddr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CodeGen::AggValueSlot::isIgnored().
Referenced by EmitAggExprToLValue(), EmitAggMemberInitializer(), EmitAnyExpr(), EmitAnyExprToMem(), EmitAtomicInit(), EmitBaseInitializer(), EmitCompoundStmtWithoutScope(), EmitCXXBindTemporaryLValue(), EmitCXXConstructExpr(), EmitDeclInit(), EmitDelegatingCXXConstructorCall(), EmitExprAsInit(), EmitMaterializeTemporaryExpr(), emitPseudoObjectExpr(), EmitReturnStmt(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
LValue CodeGenFunction::EmitAggExprToLValue | ( | const Expr * | E | ) |
EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
Definition at line 1388 of file CGExprAgg.cpp.
References CreateMemTemp(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), clang::CodeGen::AggValueSlot::forLValue(), clang::Expr::getType(), hasAggregateEvaluationKind(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue(), EmitCastLValue(), EmitConditionalOperatorLValue(), EmitInitListLValue(), and EmitVAArgExprLValue().
void clang::CodeGen::CodeGenFunction::EmitAggregateAssign | ( | llvm::Value * | DestPtr, |
llvm::Value * | 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 1562 of file CodeGenFunction.h.
References EmitAggregateCopy(), hasVolatileMember(), and clang::CharUnits::Zero().
Referenced by EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), and EmitOMPAggregateAssign().
void CodeGenFunction::EmitAggregateCopy | ( | llvm::Value * | DestPtr, |
llvm::Value * | SrcPtr, | ||
QualType | EltTy, | ||
bool | isVolatile = false , |
||
CharUnits | Alignment = CharUnits::Zero() , |
||
bool | isAssignment = false |
||
) |
EmitAggregateCopy - Emit an aggregate copy.
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 1398 of file CGExprAgg.cpp.
References Builder, CGM, ConvertType(), clang::CodeGen::CGObjCRuntime::EmitGCMemmoveCollectable(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getContext(), clang::RecordType::getDecl(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CharUnits::getQuantity(), 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::IntPtrTy, clang::Type::isAnyComplexType(), clang::Type::isArrayType(), clang::CXXRecordDecl::isEmpty(), clang::CharUnits::isZero(), clang::LangOptions::NonGC, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitAggregateAssign(), EmitCXXConstructorCall(), EmitCXXMemberCallExpr(), EmitMemberInitializer(), EmitSynthesizedCXXCopyCtorCall(), generateObjCGetterBody(), and InitCatchParam().
void clang::CodeGen::CodeGenFunction::EmitAlignmentAssumption | ( | llvm::Value * | PtrValue, |
unsigned | Alignment, | ||
llvm::Value * | OffsetValue = nullptr |
||
) | [inline] |
Definition at line 1813 of file CodeGenFunction.h.
References Builder, CGM, and clang::CodeGen::CodeGenModule::getDataLayout().
Referenced by EmitOMPAlignedClause().
llvm::Value * CodeGenFunction::EmitAnnotationCall | ( | llvm::Value * | AnnotationFn, |
llvm::Value * | AnnotatedVal, | ||
StringRef | AnnotationStr, | ||
SourceLocation | Location | ||
) |
Emit an annotation call (intrinsic or builtin).
Definition at line 1652 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationString(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitFieldAnnotations(), and EmitVarAnnotations().
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.
ignoreResult | True if the resulting value isn't used. |
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, AggSlot indicates where the result should be returned.
Definition at line 118 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(), EmitBinaryOperatorLValue(), EmitIgnoredExpr(), EmitObjCBoxedExpr(), EmitOMPSimdDirective(), emitPseudoObjectExpr(), EmitReturnStmt(), and GenerateObjCAtomicGetterCopyHelperFunction().
void CodeGenFunction::EmitAnyExprToMem | ( | const Expr * | E, |
llvm::Value * | Location, | ||
Qualifiers | Quals, | ||
bool | IsInit | ||
) |
EmitAnyExprToMem - Emits the code necessary to evaluate an arbitrary expression into the given memory location.
EmitAnyExprToMem - Evaluate an expression into a given memory location.
Definition at line 147 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitComplexExprIntoLValue(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::RValue::get(), getContext(), getEvaluationKind(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAnyExprToExn(), EmitCompoundLiteralLValue(), EmitCompoundStmtWithoutScope(), EmitMaterializeTemporaryExpr(), EmitOMPAggregateAssign(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), and EmitValToTemp().
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 137 of file CGExpr.cpp.
References CreateAggTemp(), EmitAnyExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CodeGen::AggValueSlot::ignored().
Referenced by EmitStmtExprLValue().
llvm::Value * CodeGenFunction::EmitARCAutorelease | ( | llvm::Value * | value | ) |
Autorelease the given object. call i8* @objc_autorelease(i8* value)
Definition at line 2114 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_autorelease.
Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().
Autorelease the given object. call i8* @objc_autoreleaseReturnValue(i8* value)
Definition at line 2123 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_autoreleaseReturnValue.
Referenced by emitAutoreleaseOfResult().
void CodeGenFunction::EmitARCCopyWeak | ( | llvm::Value * | dst, |
llvm::Value * | 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 2241 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_copyWeak.
void CodeGenFunction::EmitARCDestroyStrong | ( | llvm::Value * | 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 2036 of file CGObjC.cpp.
References Builder, EmitARCRelease(), EmitARCStoreStrongCall(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().
void CodeGenFunction::EmitARCDestroyWeak | ( | llvm::Value * | addr | ) |
void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil).
Definition at line 2215 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, and clang::CodeGen::ARCEntrypoints::objc_destroyWeak.
Referenced by EmitCallExpr(), and EmitObjectDelete().
llvm::Value * CodeGenFunction::EmitARCExtendBlockObject | ( | const Expr * | expr | ) |
Definition at line 2747 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitObjCConsumeObject(), EmitScalarExpr(), clang::Expr::getType(), shouldEmitSeparateBlockRetain(), and tryEmitARCRetainScalarExpr().
void CodeGenFunction::EmitARCInitWeak | ( | llvm::Value * | 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 2197 of file CGObjC.cpp.
References Builder, emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGen::ARCEntrypoints::objc_initWeak.
Referenced by EmitParmDecl(), EmitScalarInit(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), 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 1756 of file CGObjC.cpp.
References clang::CodeGen::ARCEntrypoints::clang_arc_use, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitObjCCollectionLiteral(), and emitWriteback().
llvm::Value * CodeGenFunction::EmitARCLoadWeak | ( | llvm::Value * | addr | ) |
i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).
Definition at line 2170 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_loadWeak.
i8* @objc_loadWeakRetained(i8** addr)
Definition at line 2177 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_loadWeakRetained.
Referenced by EmitLoadOfLValue(), and tryEmitARCRetainLoadOfScalar().
void CodeGenFunction::EmitARCMoveWeak | ( | llvm::Value * | dst, |
llvm::Value * | 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 2232 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_moveWeak.
void CodeGenFunction::EmitARCRelease | ( | llvm::Value * | value, |
ARCPreciseLifetime_t | precise | ||
) |
Release the given object. call void @objc_release(i8* value)
Definition at line 2003 of file CGObjC.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, createARCRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ARCEntrypoints::objc_release.
Referenced by EmitARCDestroyStrong(), EmitARCStoreStrong(), EmitCallExpr(), EmitObjectDelete(), EmitScalarInit(), and emitWriteback().
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 1906 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitARCRetainNonBlock(), and clang::Type::isBlockPointerType().
Referenced by emitARCRetainLoadOfScalar(), EmitARCRetainScalarExpr(), EmitARCStoreStrong(), EmitObjCProduceObject(), 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 2145 of file CGObjC.cpp.
References Builder, EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::Type::isBlockPointerType().
Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitObjCExtendObjectLifetime(), EmitObjCMessageExpr(), and EmitScalarInit().
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 1957 of file CGObjC.cpp.
References Builder, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::TargetCodeGenInfo::getARCRetainAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::CodeGen::ARCEntrypoints::objc_retainAutoreleasedReturnValue, clang::CodeGen::ARCEntrypoints::retainAutoreleasedReturnValueMarker, clang::ast_matchers::type, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitARCRetainAfterCall().
Do a fused retain/autorelease of the given object. call i8* @objc_retainAutorelease(i8* value)
Definition at line 2162 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_retainAutorelease.
Referenced by EmitARCRetainAutorelease().
Do a fused retain/autorelease of the given object. call i8* @objc_retainAutoreleaseReturnValue(i8* value)
Definition at line 2133 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_retainAutoreleaseReturnValue.
Referenced by tryEmitFusedAutoreleaseOfResult().
llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr | ( | const Expr * | expr | ) |
Definition at line 2730 of file CGObjC.cpp.
References EmitARCAutorelease(), EmitARCRetainAutorelease(), enterFullExpression(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().
Referenced by EmitARCStoreAutoreleasing(), EmitObjCThrowOperand(), and EmitScalarInit().
llvm::Value * CodeGenFunction::EmitARCRetainBlock | ( | llvm::Value * | value, |
bool | mandatory | ||
) |
Retain the given block, with _Block_copy semantics. call i8* @objc_retainBlock(i8* value)
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 1927 of file CGObjC.cpp.
References Builder, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_retainBlock.
Referenced by EmitARCExtendBlockObject(), EmitARCRetain(), EmitARCRetainAutorelease(), EmitARCStoreStrong(), and tryEmitARCRetainScalarExpr().
llvm::Value * CodeGenFunction::EmitARCRetainNonBlock | ( | llvm::Value * | value | ) |
Retain the given object, with normal retain semantics. call i8* @objc_retain(i8* value)
Definition at line 1915 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_retain.
Referenced by EmitARCRetain(), emitARCRetainAfterCall(), EmitObjCMessageExpr(), EmitParmDecl(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), emitWriteback(), and InitCatchParam().
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 2714 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 | ) |
Definition at line 2813 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getRHS().
Referenced by EmitBinaryOperatorLValue().
llvm::Value * CodeGenFunction::EmitARCStoreStrong | ( | LValue | dst, |
llvm::Value * | newValue, | ||
bool | ignored | ||
) |
Store into a strong object. Sometimes calls this: call void @objc_storeStrong(i8** addr, i8* value) Other times, breaks it down into components.
Definition at line 2079 of file CGObjC.cpp.
References EmitARCRelease(), EmitARCRetain(), EmitARCStoreStrongCall(), EmitLoadOfScalar(), EmitStoreOfScalar(), clang::CharUnits::fromQuantity(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isARCPreciseLifetime(), clang::Type::isBlockPointerType(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, shouldUseFusedARCCalls(), and clang::ast_matchers::type.
Referenced by EmitARCStoreStrong(), EmitBinaryOperatorLValue(), and EmitStoreThroughLValue().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreStrong | ( | const BinaryOperator * | e, |
bool | ignored | ||
) |
Definition at line 2782 of file CGObjC.cpp.
References EmitARCRelease(), EmitARCRetainBlock(), EmitARCStoreStrong(), EmitLoadOfScalar(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::CodeGen::LValue::isARCPreciseLifetime(), clang::Type::isBlockPointerType(), and tryEmitARCRetainScalarExpr().
llvm::Value * CodeGenFunction::EmitARCStoreStrongCall | ( | llvm::Value * | addr, |
llvm::Value * | value, | ||
bool | ignored | ||
) |
Store into a strong object. Always calls this: call void @objc_storeStrong(i8** addr, i8* value)
Definition at line 2052 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), getElementType(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ARCEntrypoints::objc_storeStrong.
Referenced by destroyARCStrongWithStore(), EmitARCDestroyStrong(), EmitARCStoreStrong(), and EmitParmDecl().
llvm::Value * CodeGenFunction::EmitARCStoreWeak | ( | llvm::Value * | addr, |
llvm::Value * | value, | ||
bool | ignored | ||
) |
i8* @objc_storeWeak(i8** addr, i8* value) Returns value.
Definition at line 2185 of file CGObjC.cpp.
References emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_storeWeak.
Referenced by EmitScalarInit(), and EmitStoreThroughLValue().
Value * CodeGenFunction::EmitARMBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 3125 of file CGBuiltin.cpp.
References NeonIntrinsicInfo::AltLLVMIntrinsic, Builder, NeonIntrinsicInfo::BuiltinID, findNeonIntrinsicInMap(), clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::NamedDecl::getName(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::Expr::isIntegerConstantExpr(), NeonIntrinsicInfo::LLVMIntrinsic, NeonIntrinsicInfo::NameHint, NULL, and NeonIntrinsicInfo::TypeModifier.
void CodeGenFunction::emitArrayDestroy | ( | llvm::Value * | begin, |
llvm::Value * | end, | ||
QualType | type, | ||
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.
begin | - a type* denoting the first element of the array |
end | - a type* denoting one past the end of the array |
type | - 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 1451 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, | ||
llvm::Value *& | 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 1351 of file CodeGenFunction.cpp.
References Builder, ConvertType(), clang::ASTContext::getAsArrayType(), getContext(), clang::ArrayType::getElementType(), getElementType(), getVLASize(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitCXXAggrConstructorCall(), emitDestroy(), and EmitOMPAggregateAssign().
LValue CodeGenFunction::EmitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
bool | Accessed = false |
||
) |
Definition at line 2353 of file CGExpr.cpp.
References Builder, EmitBoundsCheck(), EmitCastToVoidPtr(), EmitExtVectorElementLValue(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAs(), clang::ArraySubscriptExpr::getBase(), getContext(), clang::VectorType::getElementType(), clang::ArraySubscriptExpr::getIdx(), getLangOpts(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::CodeGen::LValue::getType(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::QualType::isNull(), clang::Expr::isOBJCGCCandidate(), clang::Type::isSignedIntegerOrEnumerationType(), clang::CodeGen::LValue::isSimple(), isSimpleArrayDecayOperand(), clang::Type::isVectorType(), clang::CharUnits::isZero(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::CodeGen::LValue::MakeVectorElt(), clang::LangOptions::NonGC, SanOpts, and setObjCGCLValueClass().
Referenced by EmitCheckedLValue(), and EmitLValue().
void CodeGenFunction::EmitAsanPrologueOrEpilogue | ( | bool | Prologue | ) |
Definition at line 708 of file CGClass.cpp.
References Builder, CGM, Context, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurGD, clang::ASTContext::getASTRecordLayout(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::GlobalDecl::getDecl(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getNonVirtualSize(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::ASTContext::getTypeInfoInChars(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::FieldDecl::isBitField(), LoadCXXThis(), clang::RecordDecl::mayInsertExtraPadding(), clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitConstructorBody(), and EmitDestructorBody().
void CodeGenFunction::EmitAsmStmt | ( | const AsmStmt & | S | ) |
Definition at line 1792 of file CGStmt.cpp.
References clang::TargetCodeGenInfo::addReturnRegisterOutputs(), AddVariableConstraints(), clang::TargetCodeGenInfo::adjustInlineAsmType(), clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), Builder, CGM, ConvertType(), ConvertTypeForMem(), CurFnInfo, EmitLValue(), EmitStoreThroughLValue(), FnRetTy, clang::AsmStmt::generateAsmString(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), 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(), 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(), 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::DiagnosticsEngine::Report(), ReturnValue, S, SawAsmBlock, SimplifyConstraint(), clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateOutputConstraint(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitStmt().
RValue CodeGenFunction::EmitAtomicExpr | ( | AtomicExpr * | E, |
llvm::Value * | Dest = nullptr |
||
) |
Definition at line 489 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), AddDirectArgument(), clang::CodeGen::RequiredArgs::All, clang::AtomicExpr::AO_ABI_memory_order_acq_rel, clang::AtomicExpr::AO_ABI_memory_order_acquire, clang::AtomicExpr::AO_ABI_memory_order_consume, clang::AtomicExpr::AO_ABI_memory_order_relaxed, clang::AtomicExpr::AO_ABI_memory_order_release, clang::AtomicExpr::AO_ABI_memory_order_seq_cst, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::ASTContext::BoolTy, Builder, CGM, convertTempToRValue(), createBasicBlock(), CreateMemTemp(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurFn, EmitAtomicInit(), EmitAtomicOp(), EmitCall(), EmitCastToVoidPtr(), EmitScalarExpr(), EmitStoreOfScalar(), EmitUnsupportedRValue(), EmitValToTemp(), Func, clang::CodeGen::RValue::get(), clang::Type::getAs(), getContext(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ASTContext::getIntPtrType(), clang::ASTContext::getIntTypeForBitwidth(), getLLVMContext(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::AtomicExpr::getNumSubExprs(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getSize(), getTarget(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::AtomicExpr::isCmpXChg(), clang::Type::isPointerType(), clang::Type::isVoidType(), clang::CodeGen::LValue::MakeAddr(), MakeAddrLValue(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::ASTContext::toBits(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.
void CodeGenFunction::EmitAtomicInit | ( | Expr * | E, |
LValue | lvalue | ||
) |
Definition at line 1133 of file CGAtomic.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), clang::Expr::getType(), clang::Type::isAtomicType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsZeroed, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAtomicExpr(), and EmitExprAsInit().
RValue CodeGenFunction::EmitAtomicLoad | ( | LValue | src, |
SourceLocation | loc, | ||
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 909 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), clang::AtomicExpr::AO_ABI_memory_order_seq_cst, Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), CreateMemTemp(), clang::CodeGen::CodeGenModule::DecorateInstruction(), emitAtomicLibcall(), EmitCastToVoidPtr(), EmitFromMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::AggValueSlot::getAddr(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::LValue::getAlignment(), getContext(), clang::CharUnits::getQuantity(), clang::ASTContext::getSizeType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::AggValueSlot::isVolatile(), clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Scalar, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitLoadOfScalar().
void CodeGenFunction::EmitAtomicStore | ( | RValue | rvalue, |
LValue | dest, | ||
bool | isInit | ||
) |
Emit a store to an l-value of atomic type.
Note that the r-value is expected to be an r-value *of the atomic type*; this means that for aggregate r-values, it should include storage for any padding that was necessary.
Definition at line 1053 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), clang::AtomicExpr::AO_ABI_memory_order_seq_cst, Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), emitAtomicLibcall(), EmitCastToVoidPtr(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddr(), clang::CodeGen::LValue::getAlignment(), getContext(), getLLVMContext(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getSizeType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::RValue::isAggregate(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitStoreOfScalar().
void CodeGenFunction::EmitAttributedStmt | ( | const AttributedStmt & | S | ) |
Definition at line 461 of file CGStmt.cpp.
References EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitStmt(), EmitWhileStmt(), clang::AttributedStmt::getAttrs(), clang::Stmt::getStmtClass(), and clang::AttributedStmt::getSubStmt().
Referenced by EmitSimpleStmt().
EmitAutoVarAlloca - Emit the alloca and debug information for a local variable. Does not emit initialization or destruction.
Definition at line 865 of file CGDecl.cpp.
References BuildByRefType(), Builder, CGM, ConvertTypeForMem(), CreateTempAlloca(), EmitStaticVarDecl(), EmitVarAnnotations(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMLifetimeStartFn(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::CharUnits::getQuantity(), getTarget(), clang::ValueDecl::getType(), getVLASize(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::InternalLinkage, clang::Type::isArrayType(), clang::Expr::isConstantInitializer(), clang::Type::isConstantSizeType(), clang::VarDecl::isConstexpr(), 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, pushStackRestore(), ReturnValue, shouldUseLifetimeMarkers(), Stack, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().
Referenced by BeginCatch(), EmitAutoVarDecl(), EmitObjCForCollectionStmt(), EmitOMPFirstprivateClause(), and EmitPrivateLoopCounters().
void CodeGenFunction::EmitAutoVarCleanups | ( | const AutoVarEmission & | emission | ) |
Definition at line 1292 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), CGM, EHStack, emitAutoVarTypeCleanup(), enterByrefCleanup(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::Decl::getAttr(), getLangOpts(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getSizeForLifetimeMarkers(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::QualType::isDestructedType(), clang::LangOptions::NonGC, clang::CodeGen::NormalAndEHCleanup, clang::CodeGen::NormalCleanup, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().
Referenced by BeginCatch(), EmitAutoVarDecl(), EmitObjCForCollectionStmt(), EmitOMPFirstprivateClause(), and EmitPrivateLoopCounters().
void CodeGenFunction::EmitAutoVarDecl | ( | const VarDecl & | D | ) |
EmitAutoVarDecl - Emit an auto variable declaration.
This function can be called with a null (unreachable) insert point.
EmitAutoVarDecl - Emit code and set up an entry in LocalDeclMap for a variable declaration with auto, register, or no storage class specifier. These turn into simple stack objects, or GlobalValues depending on target.
Definition at line 856 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 | ) |
Definition at line 1085 of file CGDecl.cpp.
References Builder, CGM, ContainsLabel(), emitByrefStructureInit(), clang::CodeGen::CodeGenModule::EmitConstantInit(), EmitExprAsInit(), emitStoresForInitAfterMemset(), EmitStoreThroughLValue(), EnsureInsertPoint(), clang::CodeGen::RValue::get(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::VarDecl::getInit(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::CharUnits::getQuantity(), getStaticDeclName(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, isCapturedBy(), clang::VarDecl::isConstexpr(), isTrivialInitializer(), clang::QualType::isVolatileQualified(), MakeAddrLValue(), clang::CodeGen::LValue::setNonGC(), shouldUseMemSetPlusStoresToInitialize(), and clang::ast_matchers::type.
Referenced by EmitAutoVarDecl(), and EmitObjCForCollectionStmt().
void CodeGenFunction::emitAutoVarTypeCleanup | ( | const AutoVarEmission & | emission, |
QualType::DestructionKind | dtorKind | ||
) |
Enter a destroy cleanup for the given local variable.
Definition at line 1235 of file CGDecl.cpp.
References destroyARCStrongImprecise, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, clang::CodeGen::EHCleanup, EHStack, getARCCleanupKind(), clang::Type::getAsCXXRecordDecl(), getDestroyer(), clang::CXXRecordDecl::getDestructor(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::isARCPseudoStrong(), clang::Type::isArrayType(), clang::CodeGen::NormalAndEHCleanup, and clang::ast_matchers::type.
Referenced by EmitAutoVarCleanups().
Definition at line 3101 of file CGExpr.cpp.
References clang::BO_Assign, clang::BO_Comma, clang::BO_PtrMemD, clang::BO_PtrMemI, EmitAggExprToLValue(), EmitAnyExpr(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitCheckedLValue(), EmitComplexAssignmentLValue(), EmitIgnoredExpr(), EmitLValue(), EmitPointerToDataMemberBinaryExpr(), EmitStoreThroughLValue(), EnsureInsertPoint(), getEvaluationKind(), clang::BinaryOperator::getLHS(), clang::QualType::getObjCLifetime(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, TCK_Store, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitLValue().
void CodeGenFunction::EmitBlock | ( | llvm::BasicBlock * | BB, |
bool | IsFinished = false |
||
) |
EmitBlock - Emit the given block
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 340 of file CGStmt.cpp.
References Builder, CurFn, and EmitBranch().
Referenced by EmitAggMemberInitializer(), emitArrayDestroy(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitCall(), emitCatchDispatchBlock(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), EmitCtorPrologue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLabel(), EmitLandingPad(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitOMPAggregateAssign(), EmitOMPIfClause(), EmitOMPInnerLoop(), EmitOMPLoopBody(), EmitOMPSimdDirective(), EmitReturnBlock(), EmitSwitchStmt(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), 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 377 of file CGStmt.cpp.
References Builder, and CurFn.
Referenced by emitCatchDispatchBlock(), emitFilterDispatchBlock(), and ExitCXXTryStmt().
RValue CodeGenFunction::EmitBlockCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 947 of file CGBlocks.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), Builder, clang::Type::castAs(), Func, clang::CodeGen::RValue::get(), clang::Type::getAs(), clang::CallExpr::getCallee(), clang::CodeGen::CodeGenModule::getContext(), clang::BlockPointerType::getPointeeType(), clang::Expr::getType(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by EmitCallExpr().
llvm::Value * CodeGenFunction::EmitBlockCopyAndAutorelease | ( | llvm::Value * | Block, |
QualType | Ty | ||
) |
Definition at line 3048 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), getContext(), clang::SelectorTable::getNullarySelector(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::Idents, and clang::ASTContext::Selectors.
llvm::Value * CodeGenFunction::EmitBlockLiteral | ( | const BlockExpr * | blockExpr | ) |
Emit a block literal expression in the current function.
Definition at line 684 of file CGBlocks.cpp.
References computeBlockInfo(), findAndRemoveBlockInfo(), clang::BlockExpr::getBlockDecl(), and clang::BlockDecl::hasCaptures().
llvm::Value * CodeGenFunction::EmitBlockLiteral | ( | const CGBlockInfo & | Info | ) |
Definition at line 703 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::Address, 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, buildBlockDescriptor(), Builder, buildGlobalBlock(), clang::CodeGen::CGBlockInfo::CanBeGlobal, clang::BlockDecl::captures(), clang::BlockDecl::capturesCXXThis(), clang::CK_LValueToRValue, clang::CodeGen::CGBlockInfo::CXXThisIndex, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::CGBlockInfo::DominatingIP, clang::CodeGen::AggValueSlot::forAddr(), GenerateBlockFunction(), clang::CodeGen::BlockFlags::getBitMask(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CGBlockInfo::Capture::getCleanup(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::QualType::getObjCLifetime(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout, clang::CodeGen::CGBlockInfo::HasCXXObject, clang::CodeGen::CodeGenTypeCache::IntTy, clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::BlockDecl::isConversionFromLambda(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isReferenceType(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), 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, |
RegionCounter & | Cnt | ||
) |
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 762 of file CodeGenFunction.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, CGM, createBasicBlock(), EmitBlock(), EmitBranch(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and HaveInsertPoint().
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 678 of file CGExpr.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), getArrayIndexingBound(), clang::Expr::getExprLoc(), clang::SanitizerSet::has(), clang::Type::isSignedIntegerOrEnumerationType(), SanOpts, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitArraySubscriptExpr(), and 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 360 of file CGStmt.cpp.
References Builder.
Referenced by EmitAggMemberInitializer(), EmitBlock(), EmitBlockWithFallThrough(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXForRangeStmt(), EmitDynamicCast(), EmitForStmt(), EmitIfStmt(), EmitIndirectGotoStmt(), 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.
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.
Definition at line 1018 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), clang::CodeGen::RegionCounter::beginRegion(), clang::BO_LAnd, clang::BO_LOr, Builder, ConstantFoldsToSimpleInteger(), createBasicBlock(), clang::CodeGen::CodeGenPGO::createBranchWeights(), EmitBlock(), EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::CodeGen::RegionCounter::getCount(), clang::CodeGen::CodeGenPGO::getCurrentRegionCount(), clang::CodeGen::RegionCounter::getParentCount(), getPGORegionCounter(), clang::Expr::IgnoreParens(), and clang::UO_LNot.
Referenced by EmitConditionalOperatorLValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitIfStmt(), EmitOMPIfClause(), and EmitOMPSimdDirective().
void CodeGenFunction::EmitBranchThroughCleanup | ( | JumpDest | Dest | ) |
Terminate the current block by emitting a branch which might leave the current cleanup-protected scope. The target scope may not yet be known, in which case this will require a fixup.
EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to
As a side-effect, this method clears the insertion point.
Definition at line 916 of file CGCleanup.cpp.
References clang::CodeGen::EHCleanupScope::addBranchAfter(), clang::CodeGen::EHCleanupScope::addBranchThrough(), Builder, CreateNormalEntry(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, clang::CodeGen::EHScopeStack::stable_iterator::encloses(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getDestIndex(), clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), clang::CodeGen::BranchFixup::InitialBranch, clang::CodeGen::EHCleanupScope::isNormalCleanup(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::BranchFixup::OptimisticBranchBlock, and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by EmitBreakStmt(), EmitContinueStmt(), EmitCXXForRangeStmt(), EmitForStmt(), EmitForwardingCallToLambda(), EmitGotoStmt(), EmitIndirectGotoStmt(), EmitOMPInnerLoop(), EmitReturnStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
void CodeGenFunction::EmitBreakStmt | ( | const BreakStmt & | S | ) |
Definition at line 1100 of file CGStmt.cpp.
References EmitBranchThroughCleanup(), EmitStopPoint(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
RValue CodeGenFunction::EmitBuiltinExpr | ( | const FunctionDecl * | FD, |
unsigned | BuiltinID, | ||
const CallExpr * | E | ||
) |
Definition at line 187 of file CGBuiltin.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, clang::prec::And, Builder, BuiltinInfo, AttributeLangSupport::C, clang::Type::castAs(), Column, Depth, EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitFAbs(), EmitFromInt(), emitLibraryCall(), EmitOverflowIntrinsic(), EmitToInt(), clang::diag::Error, clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateAsRValue(), fma, Func, clang::ASTContext::GE_None, clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CallExpr::getCallee(), clang::CodeGen::RValue::getComplex(), clang::Expr::getExprLoc(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::CallExpr::getNumArgs(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Expr::EvalStatus::hasSideEffects(), clang::Expr::HasSideEffects(), clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreParenCasts(), clang::APValue::isFloat(), clang::APValue::isInt(), clang::Expr::isIntegerConstantExpr(), clang::Type::isVoidType(), pow, sqrt, clang::Expr::EvalResult::Val, and X.
Referenced by EmitCallExpr().
RValue CodeGenFunction::EmitBuiltinNewDeleteCall | ( | const FunctionProtoType * | Type, |
const Expr * | Arg, | ||
bool | IsDelete | ||
) |
Definition at line 1057 of file CGExprCXX.cpp.
References EmitCallArgs(), EmitNewDeleteCall(), getContext(), clang::Decl::getTranslationUnitDecl(), clang::DeclContext::lookup(), and clang::FunctionProtoType::param_type_begin().
void CodeGenFunction::emitByrefStructureInit | ( | const AutoVarEmission & | emission | ) |
Initialize the structural components of a __block variable, i.e. everything but the actual object.
Definition at line 2113 of file CGBlocks.cpp.
References clang::CodeGen::BLOCK_BYREF_HAS_COPY_DISPOSE, clang::CodeGen::BLOCK_BYREF_LAYOUT_EXTENDED, clang::CodeGen::BLOCK_BYREF_LAYOUT_MASK, clang::CodeGen::BLOCK_BYREF_LAYOUT_NON_OBJECT, clang::CodeGen::BLOCK_BYREF_LAYOUT_STRONG, clang::CodeGen::BLOCK_BYREF_LAYOUT_UNRETAINED, clang::CodeGen::BLOCK_BYREF_LAYOUT_WEAK, buildByrefHelpers(), Builder, clang::CodeGen::BlockFlags::getBitMask(), clang::ASTContext::getByrefLifetime(), clang::CodeGen::CodeGenModule::getContext(), getElementType(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::Type::isBlockPointerType(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCObjectPointerType(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by EmitAutoVarInit().
RValue CodeGenFunction::EmitCall | ( | const CGFunctionInfo & | FnInfo, |
llvm::Value * | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
const CallArgList & | Args, | ||
const Decl * | TargetDecl = nullptr , |
||
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.
TargetDecl | - If given, the decl of the function in a direct call; used to set attributes on the call (noreturn, etc.). |
Definition at line 2937 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), BuildAggStore(), Builder, clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), CreateCoercedLoad(), CreateCoercedStore(), deactivateArgCleanupsBeforeCall(), clang::CodeGen::ABIArgInfo::Direct, EmitInitStoreOfNonAggregate(), emitWritebacks(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getAggregateAddr(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::Decl::getAttr(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::CallArgList::getCleanupsToDeactivate(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::CodeGenTypes::getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::ABIArgInfo::getDirectOffset(), getElementType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenTypes::getLLVMContext(), clang::CodeGen::ABIArgInfo::getPaddingType(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CallArgList::getStackBase(), clang::CodeGen::CodeGenTypes::getTarget(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::ReturnValueSlot::getValue(), clang::CodeGen::CallArgList::hasWritebacks(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::RValue::isAggregate(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::CGFunctionInfo::isVariadic(), clang::CodeGen::ReturnValueSlot::isVolatile(), clang::CodeGen::RValue::isVolatileQualified(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAtomicExpr(), emitAtomicLibcall(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXStructorCall(), EmitDelegateCXXConstructorCall(), EmitForwardingCallToLambda(), emitLibraryCall(), EmitNewDeleteCall(), EmitObjCForCollectionStmt(), emitStructGetterCall(), emitStructSetterCall(), EmitSynthesizedCXXCopyCtorCall(), generateObjCGetterBody(), and generateObjCSetterBody().
RValue CodeGenFunction::EmitCall | ( | QualType | FnType, |
llvm::Value * | Callee, | ||
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
const Decl * | TargetDecl = nullptr |
||
) |
Definition at line 3268 of file CGExpr.cpp.
References clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), Builder, CGM, clang::frontend::CPlusPlus, createBasicBlock(), EmitBlock(), EmitCall(), EmitCallArgs(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::ASTContext::getCanonicalType(), getContext(), clang::CallExpr::getDirectCallee(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CallExpr::getLocStart(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::CodeGen::CodeGenModule::getTypes(), getTypes(), clang::TargetCodeGenInfo::getUBSanFunctionSignature(), clang::SanitizerSet::has(), clang::Type::isFunctionPointerType(), and SanOpts.
void CodeGenFunction::EmitCallAndReturnForThunk | ( | llvm::Value * | Callee, |
const ThunkInfo * | Thunk | ||
) |
Definition at line 228 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(), FinishFunction(), 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::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::CodeGen::ReturnValueSlot::isNull(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), LoadCXXThis(), clang::FunctionDecl::params(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), clang::ThunkInfo::Return, ReturnValue, similar(), clang::ThunkInfo::This, 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 2714 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, clang::CK_LValueToRValue, createPlaceholderSlot(), clang::CodeGen::EHCleanup, emitWritebackArg(), clang::CodeGen::AggValueSlot::getAddr(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenTypes::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::TargetInfo::getCXXABI(), clang::Expr::getObjectKind(), clang::CodeGen::CGCXXABI::getRecordArgABI(), clang::CodeGen::CodeGenModule::getTarget(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), 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.
void clang::CodeGen::CodeGenFunction::EmitCallArgs | ( | CallArgList & | Args, |
const T * | CallArgTypeInfo, | ||
CallExpr::const_arg_iterator | ArgBeg, | ||
CallExpr::const_arg_iterator | ArgEnd, | ||
const FunctionDecl * | CalleeDecl = nullptr , |
||
unsigned | ParamsToSkip = 0 , |
||
bool | ForceColumnInfo = false |
||
) | [inline] |
EmitCallArgs - Emit call arguments for a function.
Definition at line 2710 of file CodeGenFunction.h.
References clang::Type::getAs(), clang::ASTContext::getAsVariableArrayType(), clang::ASTContext::getCanonicalType(), getContext(), clang::QualType::getNonReferenceType(), clang::Expr::getType(), clang::CanQual< T >::getTypePtr(), clang::Type::isPointerType(), and clang::Type::isVariableArrayType().
Referenced by commonEmitCXXMemberOrOperatorCall(), EmitBuiltinNewDeleteCall(), EmitCall(), EmitCXXConstructorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitObjCMessageExpr(), and EmitSynthesizedCXXCopyCtorCall().
void CodeGenFunction::EmitCallArgs | ( | CallArgList & | Args, |
ArrayRef< QualType > | ArgTypes, | ||
CallExpr::const_arg_iterator | ArgBeg, | ||
CallExpr::const_arg_iterator | ArgEnd, | ||
const FunctionDecl * | CalleeDecl = nullptr , |
||
unsigned | ParamsToSkip = 0 , |
||
bool | ForceColumnInfo = false |
||
) |
Definition at line 2643 of file CGCall.cpp.
References clang::CodeGen::CallArgList::allocateArgumentMemory(), clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), Builder, clang::CodeGen::CGDebugInfo::EmitLocation(), emitNonNullArgCheck(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::TargetInfo::getCXXABI(), clang::Expr::getExprLoc(), clang::CodeGen::CGDebugInfo::getLocation(), clang::CodeGen::CodeGenTypes::getTarget(), clang::CodeGen::CodeGenModule::getTarget(), and isInAllocaArgument().
RValue CodeGenFunction::EmitCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue = ReturnValueSlot() |
||
) |
Definition at line 3007 of file CGExpr.cpp.
References clang::CodeGen::ARCPreciseLifetime, Builder, EmitARCDestroyWeak(), EmitARCRelease(), EmitBlockCallExpr(), EmitBuiltinExpr(), EmitCall(), EmitCUDAKernelCallExpr(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), getDebugInfo(), clang::CallExpr::getDirectCallee(), getLangOpts(), clang::CallExpr::getLocStart(), clang::QualType::getObjCLifetime(), clang::PointerType::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Type::isBlockPointerType(), clang::FunctionDecl::isInlineSpecified(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, and ReturnValue.
Referenced by EmitCallExprLValue().
LValue CodeGenFunction::EmitCallExprLValue | ( | const CallExpr * | E | ) |
Definition at line 3149 of file CGExpr.cpp.
References EmitCallExpr(), clang::CodeGen::RValue::getAggregateAddr(), clang::CallExpr::getCallReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::Type::isReferenceType(), clang::CodeGen::RValue::isScalar(), and MakeAddrLValue().
Referenced by EmitLValue().
llvm::CallSite CodeGenFunction::EmitCallOrInvoke | ( | llvm::Value * | Callee, |
ArrayRef< llvm::Value * > | Args, | ||
const Twine & | Name = "" |
||
) |
Emits a call or invoke instruction to the given function, depending on the current state of the EH stack.
Definition at line 2900 of file CGCall.cpp.
References Builder, and clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by EmitCapturedStmt(), and clang::CodeGen::EmitOMPSerialCall().
llvm::CallSite CodeGenFunction::EmitCallOrInvoke | ( | llvm::Value * | Callee, |
const Twine & | Name = "" |
||
) |
Definition at line 2892 of file CGCall.cpp.
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 2132 of file CGStmt.cpp.
References CapturedStmtInfo, CGM, EmitCallOrInvoke(), GenerateCapturedStmtFunction(), clang::CodeGen::LValue::getAddress(), and InitCapturedStruct().
Referenced by EmitStmt().
void CodeGenFunction::EmitCaseStmt | ( | const CaseStmt & | S | ) |
Definition at line 1207 of file CGStmt.cpp.
References Builder, CGM, createBasicBlock(), EmitBlockWithFallThrough(), EmitCaseStmtRange(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::RegionCounter::getCount(), clang::CaseStmt::getLHS(), getPGORegionCounter(), clang::CaseStmt::getRHS(), clang::CaseStmt::getSubStmt(), isObviouslyBranchWithoutCleanups(), and S.
Referenced by EmitSimpleStmt().
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 1127 of file CGStmt.cpp.
References Builder, createBasicBlock(), clang::CodeGen::CodeGenPGO::createBranchWeights(), CurFn, EmitBlockWithFallThrough(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), getContext(), clang::CodeGen::RegionCounter::getCount(), clang::CaseStmt::getLHS(), getPGORegionCounter(), clang::CaseStmt::getRHS(), and clang::CaseStmt::getSubStmt().
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 2854 of file CGExpr.cpp.
References Builder, clang::CK_AddressSpaceConversion, clang::CK_AnyPointerToBlockPointerCast, clang::CK_ARCConsumeObject, clang::CK_ARCExtendBlockObject, clang::CK_ARCProduceObject, clang::CK_ARCReclaimReturnedObject, clang::CK_ArrayToPointerDecay, clang::CK_AtomicToNonAtomic, clang::CK_BaseToDerived, clang::CK_BaseToDerivedMemberPointer, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_BuiltinFnToFnPtr, clang::CK_ConstructorConversion, clang::CK_CopyAndAutoreleaseBlockObject, clang::CK_CPointerToObjCPointerCast, clang::CK_Dependent, clang::CK_DerivedToBase, clang::CK_DerivedToBaseMemberPointer, clang::CK_Dynamic, clang::CK_FloatingCast, clang::CK_FloatingComplexCast, clang::CK_FloatingComplexToBoolean, clang::CK_FloatingComplexToIntegralComplex, clang::CK_FloatingComplexToReal, clang::CK_FloatingRealToComplex, clang::CK_FloatingToBoolean, clang::CK_FloatingToIntegral, clang::CK_FunctionToPointerDecay, clang::CK_IntegralCast, clang::CK_IntegralComplexCast, clang::CK_IntegralComplexToBoolean, clang::CK_IntegralComplexToFloatingComplex, clang::CK_IntegralComplexToReal, clang::CK_IntegralRealToComplex, clang::CK_IntegralToBoolean, clang::CK_IntegralToFloating, clang::CK_IntegralToPointer, clang::CK_LValueBitCast, clang::CK_LValueToRValue, clang::CK_MemberPointerToBoolean, clang::CK_NonAtomicToAtomic, clang::CK_NoOp, clang::CK_NullToMemberPointer, clang::CK_NullToPointer, clang::CK_ObjCObjectLValueCast, clang::CK_PointerToBoolean, clang::CK_PointerToIntegral, clang::CK_ReinterpretMemberPointer, clang::CK_ToUnion, clang::CK_ToVoid, clang::CK_UncheckedDerivedToBase, clang::CK_UserDefinedConversion, clang::CK_VectorSplat, clang::CK_ZeroToOCLEvent, ConvertType(), EmitAggExprToLValue(), EmitDynamicCast(), EmitLValue(), EmitTypeCheck(), EmitUnsupportedLValue(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::Type::getAs(), clang::CastExpr::getCastKind(), getContext(), clang::RecordType::getDecl(), clang::Expr::getExprLoc(), clang::ASTContext::getLValueReferenceType(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), MakeAddrLValue(), clang::CastExpr::path_begin(), clang::CastExpr::path_end(), sanitizePerformTypeCheck(), and TCK_DowncastReference.
Referenced by EmitLValue().
llvm::Value * CodeGenFunction::EmitCastToVoidPtr | ( | llvm::Value * | value | ) |
Emit a cast to void* in the appropriate address space.
Definition at line 42 of file CGExpr.cpp.
References Builder, getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by AddDirectArgument(), EmitArraySubscriptExpr(), EmitAtomicExpr(), EmitAtomicLoad(), EmitAtomicStore(), EmitNullBaseClassInitialization(), and clang::CodeGen::EmitOMPParallelCall().
void CodeGenFunction::EmitCheck | ( | ArrayRef< std::pair< llvm::Value *, SanitizerKind >> | 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 2225 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), EmitBlock(), EmitCheckValue(), EmitNounwindRuntimeCall(), EmitTrapCheck(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), getRecoverableKind(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntPtrTy, IsSanitizerScope, Node, SanOpts, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitBoundsCheck(), EmitCall(), EmitLoadOfScalar(), emitNonNullArgCheck(), EmitTypeCheck(), EmitVariablyModifiedType(), 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 782 of file CGExpr.cpp.
References EmitArraySubscriptExpr(), EmitLValue(), EmitTypeCheck(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isSimple(), and SanOpts.
Referenced by EmitBinaryOperatorLValue(), and EmitMemberExpr().
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:
For an invalid SourceLocation, the Filename pointer is null.
Definition at line 2179 of file CGExpr.cpp.
References Builder, CGM, Column, clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::PresumedLoc::getColumn(), getContext(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::ASTContext::getSourceManager(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::PresumedLoc::isValid(), and Line.
Referenced by EmitBoundsCheck(), EmitCall(), EmitLoadOfScalar(), emitNonNullArgCheck(), EmitTypeCheck(), EmitVariablyModifiedType(), 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 2101 of file CGExpr.cpp.
References clang::DiagnosticsEngine::ak_qualtype, Builder, AttributeLangSupport::C, CGM, clang::DiagnosticsEngine::ConvertArgToString(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), clang::QualType::getAsOpaquePtr(), getContext(), clang::CodeGen::CodeGenModule::getDiags(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::CodeGen::CodeGenModule::getTypeDescriptorFromMap(), clang::ASTContext::getTypeSize(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerType(), and clang::CodeGen::CodeGenModule::setTypeDescriptorInMap().
Referenced by EmitBoundsCheck(), EmitCall(), EmitLoadOfScalar(), EmitTypeCheck(), and EmitVariablyModifiedType().
Convert a value into a format suitable for passing to a runtime sanitizer handler.
Definition at line 2144 of file CGExpr.cpp.
References Builder, CreateTempAlloca(), getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by EmitCheck(), and EmitLoadOfScalar().
Value * CodeGenFunction::EmitCommonNeonBuiltinExpr | ( | unsigned | BuiltinID, |
unsigned | LLVMIntrinsic, | ||
unsigned | AltLLVMIntrinsic, | ||
const char * | NameHint, | ||
unsigned | Modifier, | ||
const CallExpr * | E, | ||
SmallVectorImpl< llvm::Value * > & | Ops, | ||
llvm::Value * | Align = nullptr |
||
) |
Definition at line 2615 of file CGBuiltin.cpp.
References Builder, fabs, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, fma, clang::CallExpr::getArg(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::Expr::isIntegerConstantExpr(), and UnsignedAlts.
Emit an l-value for an assignment (simple or compound) of complex type.
Definition at line 1052 of file CGExprComplex.cpp.
References clang::BO_Assign, and clang::BinaryOperator::getOpcode().
Referenced by EmitBinaryOperatorLValue().
Definition at line 1073 of file CGExprComplex.cpp.
References getComplexOp(), and clang::BinaryOperator::getOpcode().
Referenced by EmitLValue().
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 1022 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 1031 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 | ||
) |
Definition at line 707 of file CGExpr.cpp.
References Builder, EmitLoadOfComplex(), EmitStoreOfComplex(), clang::Type::getAs(), getContext(), getElementType(), clang::UnaryOperator::getExprLoc(), getLLVMContext(), and clang::Expr::getType().
Referenced by EmitUnaryOpLValue().
Value * CodeGenFunction::EmitComplexToScalarConversion | ( | ComplexPairTy | Src, |
QualType | SrcTy, | ||
QualType | DstTy | ||
) |
EmitComplexToScalarConversion - 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 3401 of file CGExprScalar.cpp.
References hasScalarEvaluationKind(), and clang::Type::isAnyComplexType().
Referenced by EvaluateExprAsBool().
Definition at line 3445 of file CGExprScalar.cpp.
References clang::BO_Add, clang::BO_And, clang::BO_Assign, clang::BO_Comma, clang::BO_Div, clang::BO_EQ, clang::BO_GE, clang::BO_GT, clang::BO_LAnd, clang::BO_LE, clang::BO_LOr, clang::BO_LT, clang::BO_Mul, clang::BO_NE, clang::BO_Or, clang::BO_PtrMemD, clang::BO_PtrMemI, clang::BO_Rem, clang::BO_Shl, clang::BO_Shr, clang::BO_Sub, clang::BO_Xor, COMPOUND_OP, and clang::BinaryOperator::getOpcode().
Referenced by EmitLValue().
Definition at line 2732 of file CGExpr.cpp.
References CGM, CreateMemTemp(), EmitAnyExprToMem(), EmitVariablyModifiedType(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCompoundLiteral(), clang::CompoundLiteralExpr::getInitializer(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::CompoundLiteralExpr::isFileScope(), clang::Type::isVariablyModifiedType(), and MakeAddrLValue().
Referenced by EmitLValue().
llvm::Value * 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 267 of file CGStmt.cpp.
References EmitCompoundStmtWithoutScope(), getContext(), clang::CompoundStmt::getLBracLoc(), and clang::Stmt::getSourceRange().
Referenced by EmitSimpleStmt().
llvm::Value * CodeGenFunction::EmitCompoundStmtWithoutScope | ( | const CompoundStmt & | S, |
bool | GetLast = false , |
||
AggValueSlot | AVS = AggValueSlot::ignored() |
||
) |
Definition at line 279 of file CGStmt.cpp.
References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_begin(), clang::CompoundStmt::body_end(), CreateMemTemp(), EmitAggExpr(), EmitAnyExprToMem(), EmitLabel(), EmitStmt(), EnsureInsertPoint(), and hasAggregateEvaluationKind().
Referenced by EmitCompoundStmt(), EmitFunctionBody(), and GenerateObjCMethod().
void CodeGenFunction::EmitCondBrHints | ( | llvm::LLVMContext & | Context, |
llvm::BranchInst * | CondBr, | ||
ArrayRef< const Attr * > | Attrs | ||
) |
Definition at line 586 of file CGStmt.cpp.
References Builder, CGM, clang::Expr::EvaluateKnownConstInt(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and State.
Referenced by EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), and EmitWhileStmt().
Definition at line 2775 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), clang::CodeGen::RegionCounter::beginRegion(), Builder, ConstantFoldsToSimpleInteger(), ContainsLabel(), createBasicBlock(), EmitAggExprToLValue(), EmitBlock(), EmitBranchOnBoolExpr(), EmitLValue(), EmitLValueOrThrowExpression(), EmitUnsupportedLValue(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), clang::AbstractConditionalOperator::getCond(), clang::CodeGen::RegionCounter::getCount(), clang::AbstractConditionalOperator::getFalseExpr(), getPGORegionCounter(), clang::AbstractConditionalOperator::getTrueExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), clang::Expr::isGLValue(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitConstructorBody | ( | FunctionArgList & | Args | ) |
EmitConstructorBody - Emits the body of the current constructor.
Definition at line 771 of file CGClass.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, CGM, clang::Ctor_Base, clang::Ctor_Complete, CurGD, EmitAsanPrologueOrEpilogue(), EmitCtorPrologue(), EmitDelegateCXXConstructorCall(), EmitStmt(), EnterCXXTryStmt(), ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::FunctionDecl::getBody(), clang::GlobalDecl::getCtorType(), clang::TargetInfo::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::Decl::getLocEnd(), getPGORegionCounter(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), and IsConstructorDelegationValid().
Referenced by GenerateCode().
void CodeGenFunction::EmitContinueStmt | ( | const ContinueStmt & | S | ) |
Definition at line 1112 of file CGStmt.cpp.
References EmitBranchThroughCleanup(), EmitStopPoint(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
void CodeGenFunction::EmitCtorPrologue | ( | const CXXConstructorDecl * | CD, |
CXXCtorType | CtorType, | ||
FunctionArgList & | Args | ||
) |
EmitCtorPrologue - This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor.
Definition at line 1221 of file CGClass.cpp.
References Builder, CGM, EmitBaseInitializer(), EmitBlock(), clang::CodeGen::CGCXXABI::EmitCtorCompleteObjectHandler(), EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::init_end(), InitializeVTablePointers(), clang::CXXCtorInitializer::isAnyMemberInitializer(), clang::CXXCtorInitializer::isBaseInitializer(), and clang::CXXConstructorDecl::isDelegatingConstructor().
Referenced by EmitConstructorBody().
RValue CodeGenFunction::EmitCUDAKernelCallExpr | ( | const CUDAKernelCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 333 of file CGExprCXX.cpp.
References CGM, clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), and clang::CodeGen::CodeGenModule::getCUDARuntime().
Referenced by EmitCallExpr().
void CodeGenFunction::EmitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
const ConstantArrayType * | arrayType, | ||
llvm::Value * | arrayBegin, | ||
const CXXConstructExpr * | E, | ||
bool | zeroInitialize = false |
||
) |
EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.
ctor | the constructor to call for each element |
arrayType | the type of the array to initialize |
arrayBegin | an arrayType* |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 1614 of file CGClass.cpp.
References emitArrayLength().
Referenced by EmitCXXConstructExpr(), and EmitNewArrayInitializer().
void CodeGenFunction::EmitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
llvm::Value * | numElements, | ||
llvm::Value * | arrayBegin, | ||
const CXXConstructExpr * | E, | ||
bool | zeroInitialize = false |
||
) |
EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.
ctor | the constructor to call for each element |
numElements | the number of elements in the array; may be zero |
arrayBegin | a T*, where T is the type constructed by ctor |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 1633 of file CGClass.cpp.
References Builder, createBasicBlock(), clang::Ctor_Complete, destroyCXXObject, EmitBlock(), EmitCXXConstructorCall(), EmitNullInitialization(), getContext(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialDestructor(), pushRegularPartialArrayCleanup(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.
Definition at line 3190 of file CGExpr.cpp.
References CreateAggTemp(), EmitAggExpr(), EmitCXXTemporary(), clang::CodeGen::AggValueSlot::getAddr(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::CXXBindTemporaryExpr::getTemporary(), clang::Expr::getType(), MakeAddrLValue(), and clang::CodeGen::AggValueSlot::setExternallyDestructed().
Referenced by EmitLValue().
void CodeGenFunction::EmitCXXConstructExpr | ( | const CXXConstructExpr * | E, |
AggValueSlot | Dest | ||
) |
Definition at line 382 of file CGExprCXX.cpp.
References clang::CXXConstructExpr::CK_Complete, clang::CXXConstructExpr::CK_Delegating, clang::CXXConstructExpr::CK_NonVirtualBase, clang::CXXConstructExpr::CK_VirtualBase, clang::Ctor_Base, clang::Ctor_Complete, CurGD, EmitAggExpr(), EmitCXXAggrConstructorCall(), EmitCXXConstructorCall(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::AggValueSlot::getAddr(), clang::CXXConstructExpr::getArg(), clang::ASTContext::getAsConstantArrayType(), clang::CXXConstructExpr::getConstructionKind(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::GlobalDecl::getCtorType(), getLangOpts(), clang::Expr::getType(), clang::CXXConstructExpr::isElidable(), clang::CodeGen::AggValueSlot::isIgnored(), clang::Expr::isTemporaryObject(), clang::CodeGen::AggValueSlot::isZeroed(), and clang::CXXConstructExpr::requiresZeroInitialization().
Referenced by EmitCXXConstructLValue().
Definition at line 3167 of file CGExpr.cpp.
References CreateAggTemp(), EmitCXXConstructExpr(), clang::Type::getAsCXXRecordDecl(), clang::Expr::getType(), clang::CXXRecordDecl::hasTrivialDestructor(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitCXXConstructorCall | ( | const CXXConstructorDecl * | D, |
CXXCtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
llvm::Value * | This, | ||
const CXXConstructExpr * | E | ||
) |
Definition at line 1732 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGCXXABI::addImplicitConstructorArgs(), clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), clang::Type::castAs(), CGM, EmitAggregateCopy(), EmitCall(), EmitCallArgs(), EmitLValue(), EmitTypeCheck(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CXXConstructExpr::getArg(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::getFromCtorType(), clang::CXXConstructExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), getRecordType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::FunctionDecl::isTrivial(), and TCK_ConstructorCall.
Referenced by EmitCXXAggrConstructorCall(), and EmitCXXConstructExpr().
void CodeGenFunction::EmitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 1580 of file CGExprCXX.cpp.
References Builder, ConvertTypeForMem(), createBasicBlock(), EmitArrayDelete(), EmitBlock(), EmitObjectDelete(), EmitScalarExpr(), clang::CXXDeleteExpr::getArgument(), clang::Type::getAs(), getContext(), getElementType(), clang::Expr::getType(), clang::CXXDeleteExpr::isArrayForm(), and clang::Type::isConstantArrayType().
void CodeGenFunction::EmitCXXDestructorCall | ( | const CXXDestructorDecl * | D, |
CXXDtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
llvm::Value * | This | ||
) |
Definition at line 1907 of file CGClass.cpp.
References CGM, clang::CodeGen::CGCXXABI::EmitDestructorCall(), and clang::CodeGen::CodeGenModule::getCXXABI().
Referenced by EmitDestructorBody(), and EmitObjectDelete().
void CodeGenFunction::EmitCXXForRangeStmt | ( | const CXXForRangeStmt & | S, |
ArrayRef< const Attr * > | Attrs = None |
||
) |
Definition at line 929 of file CGStmt.cpp.
References Builder, createBasicBlock(), clang::CodeGen::CodeGenPGO::createLoopWeights(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), EmitCondBrHints(), EmitStmt(), EmitStopPoint(), EvaluateExprAsBool(), clang::CXXForRangeStmt::getBeginEndStmt(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CXXForRangeStmt::getBody(), clang::CXXForRangeStmt::getCond(), clang::CXXForRangeStmt::getInc(), getJumpDestInCurrentScope(), clang::CXXForRangeStmt::getLoopVarStmt(), getPGORegionCounter(), clang::CXXForRangeStmt::getRangeStmt(), clang::Stmt::getSourceRange(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), and clang::CodeGen::LoopInfoStack::push().
Referenced by EmitAttributedStmt(), and EmitStmt().
void CodeGenFunction::EmitCXXGlobalVarDeclInit | ( | const VarDecl & | D, |
llvm::Constant * | DeclPtr, | ||
bool | PerformInit | ||
) |
EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage.
Definition at line 135 of file CGDeclCXX.cpp.
References CGM, EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitReferenceBindingToExpr(), EmitStoreOfScalar(), clang::Decl::getAttr(), getContext(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Type::isReferenceType(), and clang::CodeGen::CodeGenModule::isTypeConstant().
Referenced by GenerateCXXGlobalVarDeclInitFunc().
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 214 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CGCXXABI::EmitGuardedInit(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::Decl::getLocation().
Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().
RValue CodeGenFunction::EmitCXXMemberCallExpr | ( | const CXXMemberCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 106 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(), CGM, clang::CodeGen::Complete, clang::Ctor_Complete, clang::Dtor_Complete, EmitAggregateAssign(), EmitAggregateCopy(), EmitCall(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::CGCXXABI::EmitVirtualDestructorCall(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::MemberExpr::getBase(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallee(), clang::QualType::getCanonicalType(), getContext(), clang::CXXMethodDecl::getCorrespondingMethodInClass(), clang::CodeGen::CodeGenModule::getCXXABI(), getCXXRecord(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::CallExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), clang::MemberExpr::getQualifier(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGCXXABI::getVirtualFunctionPointer(), clang::MemberExpr::hasQualifier(), clang::Expr::ignoreParenBaseCasts(), clang::Expr::IgnoreParens(), clang::MemberExpr::isArrow(), and clang::CodeGen::ReturnValueSlot::isNull().
Referenced by EmitCallExpr().
RValue CodeGenFunction::EmitCXXMemberOrOperatorCall | ( | const CXXMethodDecl * | MD, |
llvm::Value * | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Value * | This, | ||
llvm::Value * | ImplicitParam, | ||
QualType | ImplicitParamTy, | ||
const CallExpr * | E | ||
) |
Definition at line 72 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::Type::castAs(), CGM, commonEmitCXXMemberOrOperatorCall(), EmitCall(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), and ReturnValue.
Referenced by EmitCXXMemberCallExpr(), and EmitCXXOperatorMemberCallExpr().
RValue CodeGenFunction::EmitCXXMemberPointerCallExpr | ( | const CXXMemberCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 262 of file CGExprCXX.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::BO_PtrMemI, clang::Type::castAs(), CGM, EmitCall(), EmitCallArgs(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitLValue(), EmitScalarExpr(), EmitTypeCheck(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::CallExpr::getCallee(), clang::MemberPointerType::getClass(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Expr::IgnoreParens(), ReturnValue, and TCK_MemberCall.
Referenced by EmitCXXMemberCallExpr().
llvm::Value * CodeGenFunction::EmitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 1228 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CalculateCookiePadding(), clang::Type::castAs(), CGM, ConvertTypeForMem(), createBasicBlock(), DeactivateCleanupBlock(), EmitBlock(), EmitCallArgs(), EmitCXXNewAllocSize(), EmitNewDeleteCall(), EmitNewInitializer(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CXXNewExpr::getAllocatedType(), clang::ASTContext::getBaseElementType(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXNewExpr::hasInitializer(), clang::CodeGen::CGCXXABI::InitializeArrayCookie(), clang::CXXNewExpr::isArray(), clang::FunctionProtoType::isNothrow(), clang::QualType::isPODType(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CXXNewExpr::placement_arg_begin(), and clang::CXXNewExpr::placement_arg_end().
llvm::Value * CodeGenFunction::EmitCXXOperatorMemberCallee | ( | const CXXOperatorCallExpr * | E, |
const CXXMethodDecl * | MD, | ||
llvm::Value * | This | ||
) |
Definition at line 2167 of file CGClass.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), CanDevirtualizeMemberFunctionCall(), CGM, clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGCXXABI::getVirtualFunctionPointer(), and clang::CXXMethodDecl::isVirtual().
Referenced by EmitCXXOperatorMemberCallExpr().
RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr | ( | const CXXOperatorCallExpr * | E, |
const CXXMethodDecl * | MD, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 312 of file CGExprCXX.cpp.
References EmitAggregateAssign(), EmitCXXMemberOrOperatorCall(), EmitCXXOperatorMemberCallee(), EmitLValue(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXMethodDecl::isInstance(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isTrivial(), and clang::RecordDecl::mayInsertExtraPadding().
Referenced by EmitCallExpr().
RValue CodeGenFunction::EmitCXXStructorCall | ( | const CXXMethodDecl * | MD, |
llvm::Value * | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Value * | This, | ||
llvm::Value * | ImplicitParam, | ||
QualType | ImplicitParamTy, | ||
const CallExpr * | E, | ||
StructorType | Type | ||
) |
Definition at line 85 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), CGM, commonEmitCXXMemberOrOperatorCall(), EmitCall(), clang::CodeGen::CodeGenModule::getTypes(), and ReturnValue.
void CodeGenFunction::EmitCXXTemporary | ( | const CXXTemporary * | Temporary, |
QualType | TempType, | ||
llvm::Value * | Ptr | ||
) |
Emits all the code to cause the given temporary to be cleaned up.
Definition at line 1141 of file CGCleanup.cpp.
References clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitCXXBindTemporaryLValue().
void CodeGenFunction::EmitCXXThrowExpr | ( | const CXXThrowExpr * | E, |
bool | KeepInsertionPoint = true |
||
) |
Definition at line 426 of file CGException.cpp.
References clang::CodeGen::Complete, ConvertType(), createBasicBlock(), EmitAnyExprToExn(), EmitBlock(), EmitNoreturnRuntimeCallOrInvoke(), EmitNounwindRuntimeCall(), clang::CodeGen::CGObjCRuntime::EmitThrowStmt(), ErrorUnsupported(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getAllocateExceptionFn(), clang::Type::getAs(), getContext(), clang::CXXRecordDecl::getDestructor(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CharUnits::getQuantity(), getReThrowFn(), clang::CXXThrowExpr::getSubExpr(), clang::CodeGen::CodeGenModule::getTarget(), getThrowFn(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Type::isObjCObjectPointerType(), Record, S, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitBranchOnBoolExpr(), and EmitLValueOrThrowExpression().
void CodeGenFunction::EmitCXXTryStmt | ( | const CXXTryStmt & | S | ) |
Definition at line 599 of file CGException.cpp.
References EmitStmt(), EnterCXXTryStmt(), ErrorUnsupported(), ExitCXXTryStmt(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), and clang::CXXTryStmt::getTryBlock().
Referenced by EmitStmt().
llvm::Value * CodeGenFunction::EmitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 1692 of file CGExprCXX.cpp.
References Builder, CGM, ConvertType(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getContext(), clang::CXXTypeidExpr::getExprOperand(), clang::Expr::getType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), and clang::CXXTypeidExpr::isTypeOperand().
Referenced by EmitCXXTypeidLValue().
LValue CodeGenFunction::EmitCXXTypeidLValue | ( | const CXXTypeidExpr * | E | ) |
Definition at line 3176 of file CGExpr.cpp.
References EmitCXXTypeidExpr(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
llvm::Value * CodeGenFunction::EmitCXXUuidofExpr | ( | const CXXUuidofExpr * | E | ) |
Definition at line 3180 of file CGExpr.cpp.
References Builder, CGM, ConvertType(), clang::CodeGen::CodeGenModule::GetAddrOfUuidDescriptor(), and clang::Expr::getType().
Referenced by EmitCXXUuidofLValue().
LValue CodeGenFunction::EmitCXXUuidofLValue | ( | const CXXUuidofExpr * | E | ) |
Definition at line 3185 of file CGExpr.cpp.
References EmitCXXUuidofExpr(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitDecl | ( | const Decl & | D | ) |
EmitDecl - Emit a declaration.
This function can be called with a null (unreachable) insert point.
Definition at line 34 of file CGDecl.cpp.
References EmitVarDecl(), EmitVariablyModifiedType(), getDebugInfo(), clang::Decl::getKind(), clang::TypedefNameDecl::getUnderlyingType(), clang::VarDecl::isLocalVarDecl(), and Record.
Referenced by EmitDeclStmt(), EmitOMPFirstprivateClause(), and EmitOMPPrivateClause().
void CodeGenFunction::EmitDeclRefExprDbgValue | ( | const DeclRefExpr * | E, |
llvm::Constant * | Init | ||
) |
Definition at line 1617 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::DeclRefExpr::getDecl(), and clang::CodeGenOptions::LimitedDebugInfo.
Referenced by tryEmitAsConstant().
LValue CodeGenFunction::EmitDeclRefLValue | ( | const DeclRefExpr * | E | ) |
Definition at line 1894 of file CGExpr.cpp.
References clang::CodeGen::ARCImpreciseLifetime, BuildBlockByrefAddress(), Builder, CapturedStmtInfo, CGM, ConvertTypeForMem(), CurCodeDecl, EmitCapturedFieldLValue(), clang::CodeGen::CodeGenModule::EmitConstantValue(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), EmitThreadPrivateVarDeclLValue(), GetAddrOfBlockDecl(), getContext(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getContextValue(), clang::DeclRefExpr::getDecl(), clang::ASTContext::getDeclAlign(), clang::Expr::getExprLoc(), getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::DeclRefExpr::getLocation(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::Expr::getType(), getTypes(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Decl::hasAttr(), clang::Type::isReferenceType(), clang::Decl::isUsed(), clang::SourceLocation::isValid(), LambdaCaptureFields, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::DeclRefExpr::refersToEnclosingLocal(), clang::Qualifiers::removeObjCGCAttr(), clang::SC_Register, clang::CodeGen::LValue::setARCPreciseLifetime(), clang::CodeGen::LValue::setNonGC(), and setObjCGCLValueClass().
Referenced by EmitLValue(), and LoadObjCSelf().
void CodeGenFunction::EmitDeclStmt | ( | const DeclStmt & | S | ) |
Definition at line 1090 of file CGStmt.cpp.
References clang::DeclStmt::decls(), EmitDecl(), EmitStopPoint(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
void CodeGenFunction::EmitDefaultStmt | ( | const DefaultStmt & | S | ) |
Definition at line 1292 of file CGStmt.cpp.
References EmitBlockWithFallThrough(), EmitStmt(), getPGORegionCounter(), and clang::DefaultStmt::getSubStmt().
Referenced by EmitSimpleStmt().
void CodeGenFunction::EmitDelegateCallArg | ( | CallArgList & | args, |
const VarDecl * | param, | ||
SourceLocation | loc | ||
) |
EmitDelegateCallArg - We are performing a delegate call; that is, the current function is delegating to another one. Produce a r-value suitable for passing the given parameter.
Definition at line 2335 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), Builder, clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ValueDecl::getType(), isInAllocaArgument(), and clang::ast_matchers::type.
Referenced by EmitCallAndReturnForThunk(), EmitDelegateCXXConstructorCall(), EmitLambdaBlockInvokeBody(), and EmitLambdaDelegatingInvokeBody().
void CodeGenFunction::EmitDelegateCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
CXXCtorType | CtorType, | ||
const FunctionArgList & | Args, | ||
SourceLocation | Loc | ||
) |
Definition at line 1821 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), CGM, CurGD, EmitCall(), EmitDelegateCallArg(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::getFromCtorType(), clang::ASTContext::getPointerType(), clang::CodeGen::CodeGenModule::getTypes(), GetVTTParameter(), LoadCXXThis(), clang::CodeGen::CGCXXABI::NeedsVTTParameter(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by EmitConstructorBody().
void CodeGenFunction::EmitDelegatingCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
const FunctionArgList & | Args | ||
) |
Definition at line 1880 of file CGClass.cpp.
References CGM, clang::Ctor_Complete, CurGD, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::EHCleanup, EHStack, EmitAggExpr(), clang::CodeGen::AggValueSlot::forAddr(), getContext(), clang::GlobalDecl::getCtorType(), clang::CXXCtorInitializer::getInit(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ASTContext::getTypeAlignInChars(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::isDelegatingConstructor(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, and LoadCXXThis().
Referenced by EmitCtorPrologue().
void CodeGenFunction::EmitDeleteCall | ( | const FunctionDecl * | DeleteFD, |
llvm::Value * | Ptr, | ||
QualType | DeleteTy | ||
) |
Definition at line 1364 of file CGExprCXX.cpp.
References Builder, ConvertType(), EmitNewDeleteCall(), clang::CodeGen::RValue::get(), clang::Type::getAs(), getContext(), clang::FunctionDecl::getOverloadedOperator(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
void CodeGenFunction::emitDestroy | ( | llvm::Value * | addr, |
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
emitDestroy - Immediately perform the destruction of the given object.
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 1416 of file CGDecl.cpp.
References Builder, emitArrayDestroy(), emitArrayLength(), clang::ASTContext::getAsArrayType(), and getContext().
Referenced by clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), and generateDestroyHelper().
void CodeGenFunction::EmitDestructorBody | ( | FunctionArgList & | Args | ) |
EmitDestructorBody - Emits the body of the current destructor.
Definition at line 1351 of file CGClass.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, CanSkipVTablePointerInitialization(), CurFn, CurGD, clang::Dtor_Base, clang::Dtor_Comdat, clang::Dtor_Complete, clang::Dtor_Deleting, EmitAsanPrologueOrEpilogue(), EmitCXXDestructorCall(), EmitStmt(), EnterCXXTryStmt(), EnterDtorCleanups(), ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::FunctionDecl::getBody(), getContext(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), getLangOpts(), clang::CXXMethodDecl::getParent(), getPGORegionCounter(), getTarget(), InitializeVTablePointers(), clang::Decl::isImplicit(), LoadCXXThis(), and PopCleanupBlock().
Referenced by GenerateCode().
void CodeGenFunction::EmitDoStmt | ( | const DoStmt & | S, |
ArrayRef< const Attr * > | Attrs = None |
||
) |
Definition at line 767 of file CGStmt.cpp.
References Builder, AttributeLangSupport::C, createBasicBlock(), clang::CodeGen::CodeGenPGO::createLoopWeights(), EmitBlock(), EmitBlockWithFallThrough(), EmitCondBrHints(), EmitStmt(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::DoStmt::getBody(), clang::DoStmt::getCond(), getJumpDestInCurrentScope(), getPGORegionCounter(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), clang::CodeGen::LoopInfoStack::push(), and SimplifyForwardingBlocks().
Referenced by EmitAttributedStmt(), and EmitStmt().
llvm::Value * CodeGenFunction::EmitDynamicCast | ( | llvm::Value * | V, |
const CXXDynamicCastExpr * | DCE | ||
) |
Definition at line 1731 of file CGExprCXX.cpp.
References Builder, clang::Type::castAs(), CGM, createBasicBlock(), EmitBlock(), EmitBranch(), clang::CodeGen::CGCXXABI::EmitDynamicCastCall(), EmitDynamicCastToNull(), clang::CodeGen::CGCXXABI::EmitDynamicCastToVoid(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::PointerType::getPointeeType(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVoidType(), and clang::CodeGen::CGCXXABI::shouldDynamicCastCallBeNullChecked().
Referenced by EmitCastLValue().
void CodeGenFunction::EmitEndEHSpec | ( | const Decl * | D | ) |
EmitEndEHSpec - Emit the end of the exception spec.
Definition at line 570 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), EHStack, emitFilterDispatchBlock(), clang::EST_Dynamic, clang::EST_DynamicNone, clang::Type::getAs(), getContext(), clang::FunctionProtoType::getExceptionSpecType(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::FunctionProtoType::getNoexceptSpec(), clang::ValueDecl::getType(), clang::isNoexceptExceptionSpec(), clang::FunctionProtoType::NR_Nothrow, clang::CodeGen::EHScopeStack::popFilter(), and clang::CodeGen::EHScopeStack::popTerminate().
Referenced by FinishFunction().
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.
init | the initializing expression |
var | the variable to act as if we're initializing |
loc | the address to initialize; its type is a pointer to the LLVM mapping of the variable's type |
alignment | the alignment of the address |
capturedByInit | true if the variable is a __block variable whose address is potentially changed by the initializer |
Definition at line 1195 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(), and EmitInitializerForField().
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 2850 of file CGObjC.cpp.
References clang::CodeGen::RequiredArgs::All, Builder, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Definition at line 2495 of file CGExpr.cpp.
References clang::CodeGen::Base, Builder, CreateMemTemp(), EmitLValue(), EmitScalarExpr(), GenerateConstantVector(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAs(), clang::ExtVectorElementExpr::getBase(), clang::Qualifiers::getCVRQualifiers(), clang::ExtVectorElementExpr::getEncodedElementAccess(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getQuals(), clang::Expr::getType(), clang::ExtVectorElementExpr::isArrow(), clang::CodeGen::LValue::isExtVectorElt(), clang::Expr::isGLValue(), clang::CodeGen::LValue::isSimple(), clang::Type::isVectorType(), MakeAddrLValue(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::ast_matchers::type, and clang::QualType::withCVRQualifiers().
Referenced by EmitLValue().
Generates lvalue for partial ext_vector access.
Definition at line 1393 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), getAccessedFieldNo(), clang::Type::getAs(), clang::VectorType::getElementType(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitArraySubscriptExpr().
llvm::Value * CodeGenFunction::EmitFieldAnnotations | ( | const FieldDecl * | D, |
llvm::Value * | V | ||
) |
Emit field annotations for the given field & value. Returns the annotation result.
Definition at line 1675 of file CodeGenFunction.cpp.
References Builder, CGM, EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::Decl::specific_attrs().
Referenced by EmitLValueForField().
void CodeGenFunction::EmitForStmt | ( | const ForStmt & | S, |
ArrayRef< const Attr * > | Attrs = None |
||
) |
Definition at line 828 of file CGStmt.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, createBasicBlock(), clang::CodeGen::CodeGenPGO::createLoopWeights(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), EmitCondBrHints(), EmitStmt(), EmitStopPoint(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::ForStmt::getBody(), clang::ForStmt::getCond(), clang::ForStmt::getConditionVariable(), clang::ForStmt::getInc(), clang::ForStmt::getInit(), getJumpDestInCurrentScope(), getPGORegionCounter(), clang::Stmt::getSourceRange(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), and clang::CodeGen::LoopInfoStack::push().
Referenced by EmitAttributedStmt(), and EmitStmt().
void CodeGenFunction::EmitForwardingCallToLambda | ( | const CXXMethodDecl * | LambdaCallOperator, |
CallArgList & | CallArgs | ||
) |
Definition at line 2180 of file CGClass.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::Type::castAs(), CGM, EmitBranchThroughCleanup(), EmitCall(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ReturnValueSlot::isNull(), ReturnBlock, and ReturnValue.
Referenced by EmitLambdaBlockInvokeBody(), and EmitLambdaDelegatingInvokeBody().
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 1206 of file CGExpr.cpp.
References Builder, getContext(), and hasBooleanRepresentation().
Referenced by EmitAtomicLoad(), EmitFromInt(), EmitLoadOfScalar(), and EmitStoreThroughBitfieldLValue().
void CodeGenFunction::EmitFunctionBody | ( | FunctionArgList & | Args, |
const Stmt * | Body | ||
) |
Definition at line 748 of file CodeGenFunction.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, EmitCompoundStmtWithoutScope(), EmitStmt(), getPGORegionCounter(), and S.
Referenced by EmitLambdaToBlockPointerBody(), and GenerateCode().
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 2172 of file CGCall.cpp.
References Builder, clang::CodeGen::CodeGenTypes::ConvertType(), CreateCoercedLoad(), clang::CodeGen::ABIArgInfo::Direct, emitAutoreleaseOfResult(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, findDominatingStoreToReturnValue(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaSRet(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::Type::isObjCRetainableType(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
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 319 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurFn, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, 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 1625 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, clang::CodeGen::CodeGenTypes::ConvertType(), CreateCoercedStore(), clang::CodeGen::ABIArgInfo::Direct, emitArgumentDemotion(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::ASTContext::getAsVariableArrayType(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::CodeGenTypes::getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::getCXXABI(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::ASTContext::getDeclAlign(), clang::CodeGen::ABIArgInfo::getDirectOffset(), getElementType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectRealign(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenTypes::getLLVMContext(), clang::DeclaratorDecl::getLocStart(), clang::NamedDecl::getName(), getNonNullAttr(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenTypes::getTarget(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::Type::isConstantSizeType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::Type::isIncompleteType(), clang::QualType::isRestrictQualified(), clang::CXXMethodDecl::isVirtual(), and clang::ArrayType::Static.
Referenced by StartFunction().
void clang::CodeGen::CodeGenFunction::EmitGCMemmoveCollectable | ( | llvm::Value * | DestPtr, |
llvm::Value * | SrcPtr, | ||
QualType | Ty | ||
) |
EmitGCMemmoveCollectable - Emit special API for structs with object pointers.
void CodeGenFunction::EmitGotoStmt | ( | const GotoStmt & | S | ) |
Definition at line 481 of file CGStmt.cpp.
References EmitBranchThroughCleanup(), EmitStopPoint(), getJumpDestForLabel(), clang::GotoStmt::getLabel(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
void CodeGenFunction::EmitIfStmt | ( | const IfStmt & | S | ) |
Definition at line 513 of file CGStmt.cpp.
References Builder, ConstantFoldsToSimpleInteger(), ContainsLabel(), createBasicBlock(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), EmitStmt(), clang::IfStmt::getCond(), clang::IfStmt::getConditionVariable(), clang::IfStmt::getElse(), getPGORegionCounter(), clang::Stmt::getSourceRange(), clang::IfStmt::getThen(), and S.
Referenced by EmitStmt().
void CodeGenFunction::EmitIgnoredExpr | ( | const Expr * | E | ) |
EmitIgnoredExpr - Emit an expression in a context which ignores the result.
EmitIgnoredExpr - Emit code to compute the specified expression, ignoring the result.
Definition at line 106 of file CGExpr.cpp.
References EmitAnyExpr(), EmitLValue(), clang::CodeGen::AggValueSlot::ignored(), and clang::Expr::isRValue().
Referenced by EmitBinaryOperatorLValue(), EmitMaterializeTemporaryExpr(), EmitOMPInnerLoop(), EmitOMPLoopBody(), EmitOMPSimdDirective(), EmitOMPSimdFinal(), emitPseudoObjectExpr(), EmitStmt(), EmitVariablyModifiedType(), and tryEmitARCRetainPseudoObject().
Definition at line 1440 of file CGClass.cpp.
References clang::CompoundStmt::body(), CurGD, clang::FunctionDecl::getBody(), clang::GlobalDecl::getDecl(), and clang::Stmt::getSourceRange().
Referenced by GenerateCode().
void CodeGenFunction::EmitIndirectGotoStmt | ( | const IndirectGotoStmt & | S | ) |
Definition at line 492 of file CGStmt.cpp.
References Builder, EmitBranch(), EmitBranchThroughCleanup(), EmitScalarExpr(), clang::IndirectGotoStmt::getConstantTarget(), GetIndirectGotoBlock(), getJumpDestForLabel(), clang::IndirectGotoStmt::getTarget(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and Target.
Referenced by EmitStmt().
void CodeGenFunction::EmitInitializerForField | ( | FieldDecl * | Field, |
LValue | LHS, | ||
Expr * | Init, | ||
ArrayRef< VarDecl * > | ArrayIndexes | ||
) |
Definition at line 603 of file CGClass.cpp.
References Builder, ConvertType(), CreateTempAlloca(), EmitAggMemberInitializer(), EmitAutoVarDecl(), EmitComplexExprIntoLValue(), EmitExprAsInit(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ASTContext::getBaseElementType(), getContext(), getEvaluationKind(), clang::ValueDecl::getType(), clang::QualType::isDestructedType(), clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), needsEHCleanup(), pushEHDestroy(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitLambdaExpr(), EmitMemberInitializer(), and InitCapturedStruct().
LValue CodeGenFunction::EmitInitListLValue | ( | const InitListExpr * | E | ) |
Definition at line 2751 of file CGExpr.cpp.
References EmitAggExprToLValue(), EmitLValue(), clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), and clang::Expr::isGLValue().
Referenced by EmitLValue().
llvm::Value * CodeGenFunction::EmitIvarOffset | ( | const ObjCInterfaceDecl * | Interface, |
const ObjCIvarDecl * | Ivar | ||
) |
Definition at line 3224 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitIvarOffset(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by generateObjCGetterBody(), and generateObjCSetterBody().
void CodeGenFunction::EmitLabel | ( | const LabelDecl * | D | ) |
EmitLabel - Emit the block for the given label. It is legal to call this function even if there is no current insertion point.
Definition at line 405 of file CGStmt.cpp.
References clang::CodeGen::CodeGenFunction::LexicalScope::addLabel(), clang::CodeGen::RegionCounter::beginRegion(), Builder, EHStack, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), getJumpDestInCurrentScope(), clang::NamedDecl::getName(), getPGORegionCounter(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), clang::LabelDecl::getStmt(), clang::CodeGen::EHScopeStack::hasNormalCleanups(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), ResolveBranchFixups(), clang::CodeGen::CodeGenFunction::JumpDest::setScopeDepth(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by EmitCompoundStmtWithoutScope(), and EmitLabelStmt().
void CodeGenFunction::EmitLabelStmt | ( | const LabelStmt & | S | ) |
Definition at line 456 of file CGStmt.cpp.
References EmitLabel(), EmitStmt(), clang::LabelStmt::getDecl(), and clang::LabelStmt::getSubStmt().
Referenced by EmitSimpleStmt().
Definition at line 2215 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), BlockInfo, clang::BlockDecl::capture_begin(), EmitDelegateCallArg(), EmitForwardingCallToLambda(), clang::CodeGen::RValue::get(), GetAddrOfBlockDecl(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CGBlockInfo::getBlockDecl(), getContext(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::ASTContext::getPointerType(), getRecordType(), clang::ValueDecl::getType(), clang::BlockDecl::Capture::getVariable(), clang::CXXRecordDecl::isGenericLambda(), and clang::BlockDecl::params().
void CodeGenFunction::EmitLambdaDelegatingInvokeBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 2247 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), ConvertType(), EmitDelegateCallArg(), EmitForwardingCallToLambda(), clang::FunctionTemplateDecl::findSpecialization(), clang::CodeGen::RValue::get(), getContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), getRecordType(), clang::FunctionDecl::getTemplateSpecializationArgs(), getTypes(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::CXXRecordDecl::isGenericLambda(), and clang::FunctionDecl::params().
Referenced by EmitLambdaStaticInvokeFunction().
void CodeGenFunction::EmitLambdaExpr | ( | const LambdaExpr * | E, |
AggValueSlot | Dest | ||
) |
Definition at line 1811 of file CGExprCXX.cpp.
References clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), EmitInitializerForField(), EmitLValueForFieldInitialization(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::AggValueSlot::getAddr(), clang::CodeGen::AggValueSlot::getAlignment(), clang::LambdaExpr::getCaptureInitIndexVars(), clang::LambdaExpr::getLambdaClass(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLambdaLValue().
LValue CodeGenFunction::EmitLambdaLValue | ( | const LambdaExpr * | E | ) |
Definition at line 3199 of file CGExpr.cpp.
References CreateAggTemp(), EmitLambdaExpr(), clang::CodeGen::AggValueSlot::getAddr(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitLambdaStaticInvokeFunction | ( | const CXXMethodDecl * | MD | ) |
Definition at line 2277 of file CGClass.cpp.
References CGM, EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and clang::FunctionDecl::isVariadic().
Referenced by GenerateCode().
void CodeGenFunction::EmitLambdaToBlockPointerBody | ( | FunctionArgList & | Args | ) |
Definition at line 2236 of file CGClass.cpp.
References CGM, CurCodeDecl, CurGD, EmitFunctionBody(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), and clang::GlobalDecl::getDecl().
Referenced by GenerateCode().
llvm::BasicBlock * CodeGenFunction::EmitLandingPad | ( | ) |
Emits a landing pad for the current EH stack.
Definition at line 728 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), Builder, clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, createBasicBlock(), EHStack, EmitBlock(), clang::CodeGen::EHScopeStack::end(), clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), getCatchAllValue(), getDebugInfo(), getEHDispatchBlock(), getEHSelectorSlot(), getExceptionSlot(), clang::CodeGen::EHFilterScope::getFilter(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), clang::CodeGen::EHFilterScope::getNumFilters(), clang::CodeGen::EHCatchScope::getNumHandlers(), getOpaquePersonalityFn(), getTerminateLandingPad(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, NULL, clang::CodeGen::EHScopeStack::requiresLandingPad(), clang::CodeGen::EHScope::Terminate, and clang::CodeGen::EHCatchScope::Handler::Type.
Referenced by getInvokeDestImpl().
Definition at line 1329 of file CGExpr.cpp.
References Builder, ConvertType(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getBitFieldAddr(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CGBitFieldInfo::Offset, clang::CodeGen::CGBitFieldInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageAlignment, and clang::CodeGen::CGBitFieldInfo::StorageSize.
Referenced by EmitLoadOfLValue().
EmitLoadOfComplex - Load a complex number from the specified l-value.
EmitLoadOfComplex - Load a complex number from the specified address.
Definition at line 1047 of file CGExprComplex.cpp.
Referenced by convertTempToRValue(), EmitComplexPrePostIncDec(), EmitRValueForField(), generateObjCGetterBody(), and InitCatchParam().
Definition at line 1362 of file CGExpr.cpp.
References Builder, clang::CodeGen::RValue::get(), getAccessedFieldNo(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAs(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::VectorType::getNumElements(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isVolatileQualified(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitLoadOfLValue().
Load of global gamed gegisters are always calls to intrinsics.
Definition at line 1415 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), and clang::Type::isPointerType().
Referenced by EmitLoadOfLValue().
RValue CodeGenFunction::EmitLoadOfLValue | ( | LValue | LV, |
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.
Definition at line 1288 of file CGExpr.cpp.
References Builder, CGM, EmitARCLoadWeakRetained(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfScalar(), EmitObjCConsumeObject(), clang::CodeGen::CGObjCRuntime::EmitObjCWeakRead(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddr(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isExtVectorElt(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), and clang::Qualifiers::OCL_Weak.
Referenced by EmitRValueForField(), clang::CodeGen::EmitThreadIDAddress(), emitWritebackArg(), GenerateCapturedStmtFunction(), generateObjCGetterBody(), clang::CodeGen::GetOpenMPThreadID(), StartFunction(), and tryEmitARCRetainLoadOfScalar().
llvm::Value * CodeGenFunction::EmitLoadOfScalar | ( | llvm::Value * | Addr, |
bool | Volatile, | ||
unsigned | Alignment, | ||
QualType | Ty, | ||
SourceLocation | Loc, | ||
llvm::MDNode * | TBAAInfo = nullptr , |
||
QualType | TBAABaseTy = QualType() , |
||
uint64_t | TBAAOffset = 0 |
||
) |
EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
Definition at line 1093 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), EmitAtomicLoad(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), EmitFromMemory(), clang::CharUnits::fromQuantity(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getElementType(), getLLVMContext(), getRangeForType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getTBAAStructTagInfo(), clang::SanitizerSet::has(), hasBooleanRepresentation(), clang::Type::isAtomicType(), clang::Type::isVectorType(), clang::CodeGen::LValue::MakeAddr(), and SanOpts.
Referenced by AddDirectArgument(), convertTempToRValue(), EmitARCStoreStrong(), EmitLoadOfLValue(), EmitLoadOfScalar(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), EmitScalarInit(), emitWriteback(), InitCatchParam(), and LoadObjCSelf().
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 1028 of file CGExpr.cpp.
References EmitLoadOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::CodeGen::LValue::getType(), 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 809 of file CGExpr.cpp.
References EmitArraySubscriptExpr(), EmitBinaryOperatorLValue(), EmitCallExprLValue(), EmitCastLValue(), EmitComplexCompoundAssignmentLValue(), EmitCompoundAssignmentLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXTypeidLValue(), EmitCXXUuidofLValue(), EmitDeclRefLValue(), EmitExtVectorElementExpr(), EmitInitListLValue(), EmitLambdaLValue(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitObjCEncodeExprLValue(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), EmitOpaqueValueLValue(), EmitPredefinedLValue(), EmitPseudoObjectLValue(), EmitStmtExprLValue(), EmitStringLiteralLValue(), EmitUnaryOpLValue(), EmitUnsupportedLValue(), EmitVAArgExprLValue(), enterFullExpression(), clang::Stmt::getStmtClass(), clang::Expr::getType(), and clang::Type::isAnyComplexType().
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitArraySubscriptExpr(), EmitAsmStmt(), EmitBinaryOperatorLValue(), EmitCallExpr(), EmitCastLValue(), EmitCheckedLValue(), EmitConditionalOperatorLValue(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitExtVectorElementExpr(), EmitIgnoredExpr(), EmitInitListLValue(), EmitLValueOrThrowExpression(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitPointerToDataMemberBinaryExpr(), emitPseudoObjectExpr(), EmitReferenceBindingToExpr(), emitStructSetterCall(), EmitTypeidFromVTable(), EmitUnaryOpLValue(), EmitVAListRef(), emitWritebackArg(), and tryEmitARCRetainLoadOfScalar().
LValue CodeGenFunction::EmitLValueForField | ( | LValue | Base, |
const FieldDecl * | Field | ||
) |
Definition at line 2588 of file CGExpr.cpp.
References clang::Qualifiers::addCVRQualifiers(), Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenModule::DecorateInstruction(), EmitBitCastOfLValueToProperType(), EmitFieldAnnotations(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::ASTContext::getCharWidth(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::ASTContext::getDeclAlign(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), getLLVMContext(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::ASTContext::getTargetAddressSpace(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::LValue::getVRQualifiers(), clang::Decl::hasAttr(), clang::FieldDecl::isBitField(), clang::Type::isIncompleteType(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::CharUnits::isZero(), MakeAddrLValue(), clang::CodeGen::LValue::MakeBitfield(), clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::LValue::setTBAABaseType(), clang::CodeGen::LValue::setTBAAInfo(), clang::CodeGen::LValue::setTBAAOffset(), clang::CodeGen::CodeGenModule::shouldUseTBAA(), clang::CodeGen::CGBitFieldInfo::StorageSize, clang::ast_matchers::type, clang::Qualifiers::Volatile, clang::Qualifiers::Weak, and clang::QualType::withCVRQualifiers().
Referenced by EmitCapturedFieldLValue(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitOMPFirstprivateClause(), EmitRValueForField(), 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 2702 of file CGExpr.cpp.
References Builder, CGM, ConvertTypeForMem(), EmitBitCastOfLValueToProperType(), EmitLValueForField(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::NamedDecl::getName(), clang::QualType::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isReferenceType(), clang::CharUnits::isZero(), and MakeAddrLValue().
Referenced by EmitLambdaExpr(), EmitMemberInitializer(), and InitCapturedStruct().
LValue CodeGenFunction::EmitLValueForIvar | ( | QualType | ObjectTy, |
llvm::Value * | Base, | ||
const ObjCIvarDecl * | Ivar, | ||
unsigned | CVRQualifiers | ||
) |
Definition at line 3229 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitObjCValueForIvar(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitObjCIvarRefLValue(), emitStructGetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
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 2579 of file CGExpr.cpp.
References CurCodeDecl, EmitLValueForField(), getContext(), clang::FieldDecl::getParent(), clang::ASTContext::getTagDeclType(), and MakeNaturalAlignAddrLValue().
Referenced by StartFunction().
Definition at line 317 of file CGExpr.cpp.
References clang::SubobjectAdjustment::DTB::BasePath, CGM, createReferenceTemporary(), clang::SubobjectAdjustment::DTB::DerivedClass, clang::SubobjectAdjustment::DerivedToBase, clang::SubobjectAdjustment::DerivedToBaseAdjustment, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitAnyExprToMem(), EmitIgnoredExpr(), EmitLValueForField(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitOpaqueValueLValue(), EmitScalarExpr(), EmitScalarInit(), clang::SubobjectAdjustment::Field, clang::SubobjectAdjustment::FieldAdjustment, clang::CodeGen::AggValueSlot::forAddr(), GetAddressOfBaseClass(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getEvaluationKind(), clang::Expr::getExprLoc(), clang::MaterializeTemporaryExpr::getExtendingDecl(), getLangOpts(), clang::QualType::getObjCLifetime(), clang::QualType::getQualifiers(), clang::MaterializeTemporaryExpr::GetTemporaryExpr(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::diag::Ignored, clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isObjCLifetimeType(), clang::SubobjectAdjustment::Kind, MakeAddrLValue(), clang::SubobjectAdjustment::MemberPointerAdjustment, clang::SubobjectAdjustment::P::MPT, 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::Expr::skipRValueSubobjectAdjustments(), clang::CodeGen::TEK_Aggregate, and clang::CodeGen::TEK_Scalar.
Referenced by EmitLValue().
EmitMCountInstrumentation - Emit call to .mcount.
Definition at line 340 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 | ) |
Definition at line 2548 of file CGExpr.cpp.
References EmitCheckedLValue(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitLValueForField(), EmitScalarExpr(), EmitTypeCheck(), clang::MemberExpr::getBase(), getContext(), clang::MemberExpr::getExprLoc(), clang::MemberExpr::getMemberDecl(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::MemberExpr::isArrow(), MakeNaturalAlignAddrLValue(), setObjCGCLValueClass(), and TCK_MemberAccess.
Referenced by EmitLValue().
void CodeGenFunction::EmitMustTailThunk | ( | const CXXMethodDecl * | MD, |
llvm::Value * | AdjustedThisPtr, | ||
llvm::Value * | Callee | ||
) |
Emit a musttail call for a thunk with a potentially adjusted this pointer.
Definition at line 313 of file CGVTables.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), Builder, CGM, clang::CodeGen::CodeGenModule::ConstructAttributeList(), createBasicBlock(), CurFn, CurFnInfo, EmitBlock(), FinishFunction(), GetAddrOfLocalVar(), getElementType(), getLLVMContext(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), and clang::CodeGen::ABIArgInfo::isSRetAfterThis().
Referenced by EmitCallAndReturnForThunk().
llvm::Value* clang::CodeGen::CodeGenFunction::EmitNeon64Call | ( | llvm::Function * | F, |
llvm::SmallVectorImpl< llvm::Value * > & | O, | ||
const char * | name | ||
) |
Value * CodeGenFunction::EmitNeonCall | ( | llvm::Function * | F, |
SmallVectorImpl< llvm::Value * > & | O, | ||
const char * | name, | ||
unsigned | shift = 0 , |
||
bool | rightshift = false |
||
) |
Definition at line 1797 of file CGBuiltin.cpp.
References Builder.
Referenced by EmitAArch64TblBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), and packTBLDVectorList().
Value * CodeGenFunction::EmitNeonRShiftImm | ( | llvm::Value * | Vec, |
llvm::Value * | Amt, | ||
llvm::Type * | Ty, | ||
bool | usgn, | ||
const char * | name | ||
) |
Definition at line 1821 of file CGBuiltin.cpp.
References Builder, and clang::prec::Shift.
Value * CodeGenFunction::EmitNeonShiftVector | ( | llvm::Value * | V, |
llvm::Type * | Ty, | ||
bool | negateForRightShift | ||
) |
Definition at line 1811 of file CGBuiltin.cpp.
References AttributeLangSupport::C.
Value * CodeGenFunction::EmitNeonSplat | ( | llvm::Value * | V, |
llvm::Constant * | Idx | ||
) |
Definition at line 1791 of file CGBuiltin.cpp.
References Builder.
void CodeGenFunction::EmitNewArrayInitializer | ( | const CXXNewExpr * | E, |
QualType | elementType, | ||
llvm::Value * | NewPtr, | ||
llvm::Value * | NumElements, | ||
llvm::Value * | AllocSizeWithoutCookie | ||
) |
Definition at line 778 of file CGExprCXX.cpp.
References Builder, CGM, ConvertTypeForMem(), createBasicBlock(), CreateTempAlloca(), DeactivateCleanupBlock(), EHStack, EmitBlock(), EmitCXXAggrConstructorCall(), clang::CXXNewExpr::getAllocatedType(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getConstantArrayElementCount(), getContext(), getDestroyer(), clang::CXXNewExpr::getInitializer(), clang::CXXMethodDecl::getParent(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CXXNewExpr::hasInitializer(), clang::Type::isConstantArrayType(), clang::QualType::isDestructedType(), clang::CXXRecordDecl::isEmpty(), clang::FunctionDecl::isTrivial(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), needsEHCleanup(), pushIrregularPartialArrayCleanup(), pushRegularPartialArrayCleanup(), clang::CodeGen::EHScopeStack::stable_begin(), and StoreAnyExprIntoOneUnit().
Referenced by EmitNewInitializer().
void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value * > | args | ||
) |
Emits a call or invoke to the given noreturn runtime function.
Definition at line 2854 of file CGCall.cpp.
References Builder.
Referenced by EmitCXXThrowExpr().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::Value * | callee, |
const Twine & | name = "" |
||
) |
Referenced by CallBeginCatch(), emitARCCopyOperation(), EmitARCDestroyWeak(), EmitARCIntrinsicUse(), emitARCLoadOperation(), EmitARCRelease(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), EmitCheck(), EmitCXXThrowExpr(), EmitExtendGCLifetime(), EmitFunctionInstrumentation(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), EmitMCountInstrumentation(), EmitObjCAutoreleasePoolPush(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getTerminateHandler(), getTerminateLandingPad(), InitCatchParam(), and registerGlobalDtorWithAtExit().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value * > | args, | ||
const Twine & | name = "" |
||
) |
void CodeGenFunction::EmitNullInitialization | ( | llvm::Value * | 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.
Definition at line 1242 of file CodeGenFunction.cpp.
References Builder, CGM, clang::frontend::CPlusPlus, emitNonZeroVLAInit(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getContext(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getSize(), clang::ASTContext::getTypeInfoInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::CharUnits::isOne(), clang::CharUnits::isZero(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().
Referenced by EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitObjCForCollectionStmt(), and EmitSynthesizedCXXCopyCtor().
llvm::Value * CodeGenFunction::EmitObjCArrayLiteral | ( | const ObjCArrayLiteral * | E | ) |
Definition at line 205 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCArrayLiteral::getArrayWithObjectsMethod().
void CodeGenFunction::EmitObjCAtSynchronizedStmt | ( | const ObjCAtSynchronizedStmt & | S | ) |
Definition at line 1715 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::EmitSynchronizedStmt(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by EmitStmt().
void CodeGenFunction::EmitObjCAtThrowStmt | ( | const ObjCAtThrowStmt & | S | ) |
Definition at line 1711 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::EmitThrowStmt(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by EmitStmt().
void CodeGenFunction::EmitObjCAtTryStmt | ( | const ObjCAtTryStmt & | S | ) |
Definition at line 1707 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::EmitTryStmt(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by EmitStmt().
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup | ( | llvm::Value * | Ptr | ) |
Definition at line 2356 of file CGObjC.cpp.
References EHStack, clang::CodeGen::CodeGenModule::getLangOpts(), and clang::CodeGen::NormalCleanup.
Referenced by GenerateCXXGlobalInitFunc().
void CodeGenFunction::EmitObjCAutoreleasePoolPop | ( | llvm::Value * | value | ) |
Produce the code to do a primitive release. call void @objc_autoreleasePoolPop(i8* ptr)
Definition at line 2262 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), EmitRuntimeCallOrInvoke(), clang::CodeGen::CodeGenModule::getRREntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::RREntrypoints::objc_autoreleasePoolPop.
Produce the code to do a objc_autoreleasepool_push. call i8* @objc_autoreleasePoolPush(void)
Definition at line 2249 of file CGObjC.cpp.
References createARCRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getRREntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::RREntrypoints::objc_autoreleasePoolPush.
Referenced by EmitObjCAutoreleasePoolStmt(), and GenerateCXXGlobalInitFunc().
void CodeGenFunction::EmitObjCAutoreleasePoolStmt | ( | const ObjCAutoreleasePoolStmt & | S | ) |
Definition at line 2822 of file CGObjC.cpp.
References clang::CompoundStmt::body(), Builder, EHStack, clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitObjCAutoreleasePoolPush(), EmitObjCMRRAutoreleasePoolPush(), EmitStmt(), getDebugInfo(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CompoundStmt::getLBracLoc(), clang::CompoundStmt::getRBracLoc(), clang::ObjCAutoreleasePoolStmt::getSubStmt(), clang::ObjCRuntime::hasNativeARC(), clang::CodeGen::NormalCleanup, clang::LangOptions::ObjCRuntime, and S.
Referenced by EmitStmt().
llvm::Value * CodeGenFunction::EmitObjCBoxedExpr | ( | const ObjCBoxedExpr * | E | ) |
EmitObjCBoxedExpr - This routine generates code to call the appropriate expression boxing method. This will either be one of +[NSNumber numberWith<Type>:], or +[NSString stringWithUTF8String:].
Definition at line 61 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), Builder, CGM, ConvertType(), EmitAnyExpr(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::ObjCBoxedExpr::getBoxingMethod(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMethodDecl::getSelector(), clang::ObjCBoxedExpr::getSubExpr(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ObjCMethodDecl::isClassMethod(), and clang::ObjCMethodDecl::param_begin().
llvm::Value * CodeGenFunction::EmitObjCCollectionLiteral | ( | const Expr * | E, |
const ObjCMethodDecl * | MethodWithObjects | ||
) |
Definition at line 90 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), Builder, CGM, Context, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::LangAS::Count, CreateMemTemp(), 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::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMethodDecl::getSelector(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSize(), clang::QualType::getUnqualifiedType(), clang::ObjCDictionaryElement::Key, clang::CodeGen::LValue::MakeAddr(), 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 1741 of file CGObjC.cpp.
References getARCCleanupKind().
Referenced by EmitARCExtendBlockObject(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitLoadOfLValue(), and EmitObjCForCollectionStmt().
Definition at line 209 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCDictionaryLiteral::getDictWithObjectsMethod().
Definition at line 2070 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
Definition at line 1749 of file CGObjC.cpp.
References EmitARCRetainAutorelease().
Referenced by EmitStoreThroughLValue().
void CodeGenFunction::EmitObjCForCollectionStmt | ( | const ObjCForCollectionStmt & | S | ) |
Definition at line 1421 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::CodeGen::RegionCounter::beginRegion(), Builder, ConvertType(), clang::LangAS::Count, createBasicBlock(), clang::CodeGen::CodeGenPGO::createBranchWeights(), CreateMemTemp(), 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::SourceRange::getBegin(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::ObjCForCollectionStmt::getBody(), clang::ObjCForCollectionStmt::getCollection(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::RegionCounter::getCount(), clang::CodeGen::CodeGenPGO::getCurrentRegionCount(), getDebugInfo(), clang::ObjCForCollectionStmt::getElement(), clang::SourceRange::getEnd(), getJumpDestInCurrentScope(), getLangOpts(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), getPGORegionCounter(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, clang::CodeGen::CodeGenFunction::AutoVarEmission::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::ArrayType::Normal, clang::Qualifiers::OCL_ExplicitNone, PopCleanupBlock(), clang::ASTContext::Selectors, clang::VK_LValue, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitStmt().
LValue CodeGenFunction::EmitObjCIsaExpr | ( | const ObjCIsaExpr * | E | ) |
Definition at line 3417 of file CGExprScalar.cpp.
References Builder, ConvertType(), CreateMemTemp(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ObjCIsaExpr::getBase(), clang::ObjCIsaExpr::getExprLoc(), clang::Expr::getType(), clang::ObjCIsaExpr::isArrow(), and MakeNaturalAlignAddrLValue().
Referenced by EmitLValue().
LValue CodeGenFunction::EmitObjCIvarRefLValue | ( | const ObjCIvarRefExpr * | E | ) |
Definition at line 3237 of file CGExpr.cpp.
References EmitLValue(), EmitLValueForIvar(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ObjCIvarRefExpr::getBase(), getContext(), clang::Qualifiers::getCVRQualifiers(), clang::ObjCIvarRefExpr::getDecl(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ObjCIvarRefExpr::isArrow(), and setObjCGCLValueClass().
Referenced by EmitLValue().
RValue CodeGenFunction::EmitObjCMessageExpr | ( | const ObjCMessageExpr * | E, |
ReturnValueSlot | Return = ReturnValueSlot() |
||
) |
Definition at line 294 of file CGObjC.cpp.
References AdjustRelatedResultType(), clang::ObjCMessageExpr::arg_begin(), clang::ObjCMessageExpr::arg_end(), Builder, CGM, clang::ObjCMessageExpr::Class, CurCodeDecl, CurFuncDecl, EmitARCRetainAutorelease(), EmitARCRetainNonBlock(), EmitCallArgs(), EmitScalarExpr(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::CGObjCRuntime::GenerateMessageSendSuper(), clang::Type::getAs(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMessageExpr::getClassReceiver(), clang::Decl::getDeclContext(), getElementType(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCObjectType::getInterface(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), clang::ObjCMessageExpr::getMethodDecl(), 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::Decl::hasAttr(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isDelegateInitCall(), LoadObjCSelf(), shouldExtendReceiverForInnerPointerMessage(), clang::ObjCMessageExpr::SuperClass, clang::ObjCMessageExpr::SuperInstance, and tryEmitARCRetainScalarExpr().
Referenced by EmitObjCMessageExprLValue().
Definition at line 3205 of file CGExpr.cpp.
References EmitObjCMessageExpr(), clang::CodeGen::RValue::getAggregateAddr(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::Type::isReferenceType(), clang::CodeGen::RValue::isScalar(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop | ( | llvm::Value * | Arg | ) |
Produce the code to do a primitive release. [tmp drain];
Definition at line 2309 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::SelectorTable::getSelector(), clang::ASTContext::Idents, clang::ASTContext::Selectors, and clang::CodeGen::CodeGenTypeCache::VoidTy.
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 2284 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::EmitObjCProduceObject | ( | QualType | type, |
llvm::Value * | value | ||
) |
Produce the code for a CK_ARCProduceObject. Just does a primitive retain.
Definition at line 1722 of file CGObjC.cpp.
References EmitARCRetain().
llvm::Value * CodeGenFunction::EmitObjCProtocolExpr | ( | const ObjCProtocolExpr * | E | ) |
Definition at line 223 of file CGObjC.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::GenerateProtocolRef(), clang::CodeGen::CodeGenModule::getObjCRuntime(), and clang::ObjCProtocolExpr::getProtocol().
llvm::Value * CodeGenFunction::EmitObjCSelectorExpr | ( | const ObjCSelectorExpr * | E | ) |
Emit a selector.
Definition at line 215 of file CGObjC.cpp.
References CGM, clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetSelector(), and clang::ObjCSelectorExpr::getSelector().
Definition at line 3218 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetSelector(), clang::ObjCSelectorExpr::getSelector(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
llvm::Value * CodeGenFunction::EmitObjCStringLiteral | ( | const ObjCStringLiteral * | E | ) |
Emits an instance of NSConstantString representing the object.
Definition at line 48 of file CGObjC.cpp.
References AttributeLangSupport::C, CGM, ConvertType(), clang::CodeGen::CGObjCRuntime::GenerateConstantString(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCStringLiteral::getString(), and clang::Expr::getType().
llvm::Value * CodeGenFunction::EmitObjCThrowOperand | ( | const Expr * | expr | ) |
Definition at line 2765 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitScalarExpr(), and getLangOpts().
void CodeGenFunction::EmitOMPAggregateAssign | ( | LValue | OriginalAddr, |
llvm::Value * | PrivateAddr, | ||
const Expr * | AssignExpr, | ||
QualType | Type, | ||
const VarDecl * | VDInit | ||
) |
Definition at line 73 of file CGStmtOpenMP.cpp.
References Builder, createBasicBlock(), EmitAggregateAssign(), EmitAnyExprToMem(), emitArrayLength(), EmitBlock(), clang::CodeGen::LValue::getAddress(), clang::Type::getAsArrayTypeUnsafe(), clang::QualType::getQualifiers(), clang::Expr::getType(), isTrivialInitializer(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitOMPFirstprivateClause().
void CodeGenFunction::EmitOMPAtomicDirective | ( | const OMPAtomicDirective & | S | ) |
Definition at line 554 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPBarrierDirective | ( | const OMPBarrierDirective & | S | ) |
Definition at line 538 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPCriticalDirective | ( | const OMPCriticalDirective & | S | ) |
Definition at line 497 of file CGStmtOpenMP.cpp.
References CGM, EmitStmt(), EnsureInsertPoint(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::DeclarationNameInfo::getAsString(), clang::OMPCriticalDirective::getDirectiveName(), clang::OMPExecutableDirective::getLocEnd(), clang::OMPExecutableDirective::getLocStart(), and clang::CodeGen::CodeGenModule::getOpenMPRuntime().
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPFirstprivateClause | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 141 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), AttributeLangSupport::C, CapturedStmtInfo, clang::OMPExecutableDirective::clauses(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitDecl(), EmitLValueForField(), EmitOMPAggregateAssign(), GetAddrOfLocalVar(), getContext(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getContextValue(), clang::ASTContext::getTagDeclType(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), and MakeNaturalAlignAddrLValue().
void CodeGenFunction::EmitOMPFlushDirective | ( | const OMPFlushDirective & | S | ) |
Definition at line 546 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPForDirective | ( | const OMPForDirective & | S | ) |
Definition at line 473 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPForSimdDirective | ( | const OMPForSimdDirective & | S | ) |
Definition at line 477 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPInnerLoop | ( | const OMPLoopDirective & | S, |
OMPPrivateScope & | LoopScope, | ||
bool | SeparateIter = false |
||
) |
Definition at line 271 of file CGStmtOpenMP.cpp.
References Builder, createBasicBlock(), clang::CodeGen::CodeGenPGO::createLoopWeights(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), EmitIgnoredExpr(), EmitOMPLoopBody(), EmitStopPoint(), EvaluateExprAsBool(), clang::OMPLoopDirective::getCond(), clang::OMPLoopDirective::getInc(), getJumpDestInCurrentScope(), getPGORegionCounter(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), clang::CodeGen::LoopInfoStack::push(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
Referenced by EmitOMPSimdDirective().
void CodeGenFunction::EmitOMPLoopBody | ( | const OMPLoopDirective & | Directive, |
bool | SeparateIter = false |
||
) |
Helpers for 'omp simd' directive.
Definition at line 248 of file CGStmtOpenMP.cpp.
References EmitBlock(), EmitIgnoredExpr(), EmitStmt(), clang::OMPLoopDirective::getBody(), getJumpDestInCurrentScope(), and clang::OMPLoopDirective::updates().
Referenced by EmitOMPInnerLoop(), and EmitOMPSimdDirective().
void CodeGenFunction::EmitOMPMasterDirective | ( | const OMPMasterDirective & | S | ) |
Definition at line 493 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPOrderedDirective | ( | const OMPOrderedDirective & | S | ) |
Definition at line 550 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPParallelDirective | ( | const OMPParallelDirective & | S | ) |
Definition at line 230 of file CGStmtOpenMP.cpp.
References AttributeLangSupport::C, CGM, EmitOMPIfClause(), clang::CodeGen::EmitOMPParallelCall(), GenerateCapturedStmtArgument(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::OMPExecutableDirective::getLocStart(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::OMPExecutableDirective::getSingleClause().
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPParallelForDirective | ( | const OMPParallelForDirective & | S | ) |
Definition at line 516 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPParallelForSimdDirective | ( | const OMPParallelForSimdDirective & | S | ) |
Definition at line 520 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
Definition at line 525 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPPrivateClause | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 186 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), AttributeLangSupport::C, clang::OMPExecutableDirective::clauses(), EmitDecl(), and GetAddrOfLocalVar().
void CodeGenFunction::EmitOMPSectionDirective | ( | const OMPSectionDirective & | S | ) |
Definition at line 485 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPSectionsDirective | ( | const OMPSectionsDirective & | S | ) |
Definition at line 481 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPSimdDirective | ( | const OMPSimdDirective & | S | ) |
Definition at line 375 of file CGStmtOpenMP.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, AttributeLangSupport::C, CGM, clang::OMPExecutableDirective::clauses(), clang::OMPLoopDirective::counters(), createBasicBlock(), EmitAnyExpr(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), EmitIgnoredExpr(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitOMPAlignedClause(), EmitOMPInnerLoop(), EmitOMPLoopBody(), EmitOMPSimdFinal(), EmitPrivateLoopCounters(), EmitVarDecl(), clang::SourceRange::getBegin(), clang::OMPLoopDirective::getCalcLastIteration(), clang::CodeGen::RegionCounter::getCount(), getDebugInfo(), clang::SourceRange::getEnd(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), getPGORegionCounter(), clang::OMPLoopDirective::getPreCond(), clang::CodeGen::RValue::getScalarVal(), clang::Stmt::getSourceRange(), clang::CodeGen::AggValueSlot::ignored(), LoopStack, clang::CodeGen::LoopInfoStack::setParallel(), clang::CodeGen::LoopInfoStack::setVectorizerEnable(), and clang::CodeGen::LoopInfoStack::setVectorizerWidth().
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPSimdFinal | ( | const OMPLoopDirective & | S | ) |
Definition at line 321 of file CGStmtOpenMP.cpp.
References clang::OMPLoopDirective::counters(), EmitIgnoredExpr(), and clang::OMPLoopDirective::finals().
Referenced by EmitOMPSimdDirective().
void CodeGenFunction::EmitOMPSingleDirective | ( | const OMPSingleDirective & | S | ) |
Definition at line 489 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPTargetDirective | ( | const OMPTargetDirective & | S | ) |
Definition at line 558 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPTaskDirective | ( | const OMPTaskDirective & | S | ) |
Definition at line 530 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPTaskwaitDirective | ( | const OMPTaskwaitDirective & | S | ) |
Definition at line 542 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPTaskyieldDirective | ( | const OMPTaskyieldDirective & | S | ) |
Definition at line 534 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
void CodeGenFunction::EmitOMPTeamsDirective | ( | const OMPTeamsDirective & | S | ) |
Definition at line 562 of file CGStmtOpenMP.cpp.
Referenced by EmitStmt().
LValue CodeGenFunction::EmitOpaqueValueLValue | ( | const OpaqueValueExpr * | e | ) |
Definition at line 2982 of file CGExpr.cpp.
References getOpaqueLValueMapping(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
Referenced by EmitLValue(), and EmitMaterializeTemporaryExpr().
void CodeGenFunction::EmitParmDecl | ( | const VarDecl & | D, |
llvm::Value * | Arg, | ||
bool | ArgIsPointer, | ||
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 1643 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, clang::TargetCXXABI::areArgsDestroyedLeftToRightInCallee(), BlockInfo, Builder, CGM, ConvertTypeForMem(), CreateTempAlloca(), CurCodeDecl, CurFuncIsThunk, clang::QualType::DK_cxx_destructor, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitStoreOfScalar(), EmitVarAnnotations(), clang::CodeGen::LValue::getAddress(), getARCCleanupKind(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::TargetInfo::getCXXABI(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::ObjCMethodDecl::getSelfDecl(), getTarget(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), clang::CXXRecordDecl::hasNonTrivialDestructor(), hasScalarEvaluationKind(), clang::VarDecl::isARCPseudoStrong(), clang::CodeGenOptions::LimitedDebugInfo, MakeAddrLValue(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::OMF_init, and pushDestroy().
Definition at line 3369 of file CGExpr.cpp.
References clang::BO_PtrMemI, CGM, EmitLValue(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitScalarExpr(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue().
Value * CodeGenFunction::EmitPPCBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 6018 of file CGBuiltin.cpp.
References Builder, clang::CallExpr::getArg(), and clang::CallExpr::getNumArgs().
LValue CodeGenFunction::EmitPredefinedLValue | ( | const PredefinedExpr * | E | ) |
Definition at line 2075 of file CGExpr.cpp.
References AttributeLangSupport::C, CGM, CurCodeDecl, CurFn, clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::PredefinedExpr::getFunctionName(), clang::PredefinedExpr::getIdentType(), clang::PredefinedExpr::getIdentTypeName(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
Definition at line 3493 of file CGExpr.cpp.
References emitPseudoObjectExpr(), and clang::CodeGen::AggValueSlot::ignored().
Referenced by EmitLValue().
RValue CodeGenFunction::EmitPseudoObjectRValue | ( | const PseudoObjectExpr * | e, |
AggValueSlot | slot = AggValueSlot::ignored() |
||
) |
Definition at line 3488 of file CGExpr.cpp.
References emitPseudoObjectExpr().
Value * CodeGenFunction::EmitR600BuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 6156 of file CGBuiltin.cpp.
References Builder, emitFPIntBuiltin(), emitTernaryFPBuiltin(), emitUnaryFPBuiltin(), clang::CallExpr::getArg(), and X.
LValue clang::CodeGen::CodeGenFunction::EmitReadRegister | ( | const VarDecl * | VD | ) |
RValue CodeGenFunction::EmitReferenceBindingToExpr | ( | const Expr * | E | ) |
Emits a reference binding to the passed in expression.
Definition at line 420 of file CGExpr.cpp.
References EmitLValue(), EmitTypeCheck(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isSimple(), sanitizePerformTypeCheck(), and TCK_ReferenceBinding.
Referenced by EmitCXXGlobalVarDeclInit(), EmitExprAsInit(), and EmitReturnStmt().
void CodeGenFunction::EmitReturnBlock | ( | ) |
EmitReturnBlock - Emit the unified return block, trying to avoid its emission when possible.
Definition at line 155 of file CodeGenFunction.cpp.
References Builder, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), and ReturnBlock.
Referenced by FinishFunction().
void CodeGenFunction::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. Fun stuff :).
Definition at line 1021 of file CGStmt.cpp.
References Builder, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitAnyExpr(), EmitBranchThroughCleanup(), EmitComplexExprIntoLValue(), EmitReferenceBindingToExpr(), EmitScalarExpr(), enterFullExpression(), FnRetTy, clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), getContext(), getEvaluationKind(), getLangOpts(), clang::ReturnStmt::getNRVOCandidate(), clang::ReturnStmt::getRetValue(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::AggValueSlot::IsDestructed, clang::Expr::isEvaluatable(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::VarDecl::isNRVOVariable(), clang::Type::isReferenceType(), clang::Type::isVoidType(), MakeNaturalAlignAddrLValue(), NRVOFlags, ReturnBlock, ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitStmt(), and generateObjCGetterBody().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall | ( | llvm::Value * | callee, |
const Twine & | name = "" |
||
) |
Referenced by emitFilterDispatchBlock(), clang::CodeGen::EmitOMPBarrierCall(), clang::CodeGen::EmitOMPCriticalRegionEnd(), clang::CodeGen::EmitOMPCriticalRegionStart(), clang::CodeGen::EmitOMPNumThreadsClause(), clang::CodeGen::EmitOMPParallelCall(), clang::CodeGen::EmitOMPSerialCall(), clang::CodeGen::EmitOMPThreadPrivateVarInit(), GenerateCXXGlobalInitFunc(), getEHResumeBlock(), clang::CodeGen::getOMPAddrOfThreadPrivate(), and clang::CodeGen::GetOpenMPThreadID().
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 2883 of file CGCall.cpp.
Referenced by EmitObjCAutoreleasePoolPop(), emitRTtypeidCall(), and ExitCXXTryStmt().
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 2876 of file CGCall.cpp.
RValue CodeGenFunction::EmitRValueForField | ( | LValue | LV, |
const FieldDecl * | FD, | ||
SourceLocation | Loc | ||
) |
Definition at line 2987 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForField(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::ValueDecl::getType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
LValue CodeGenFunction::EmitScalarCompooundAssignWithComplex | ( | const CompoundAssignOperator * | E, |
llvm::Value *& | Result | ||
) |
Definition at line 1080 of file CGExprComplex.cpp.
References getComplexOp(), and clang::BinaryOperator::getOpcode().
Value * CodeGenFunction::EmitScalarConversion | ( | llvm::Value * | Src, |
QualType | SrcTy, | ||
QualType | DstTy | ||
) |
EmitScalarConversion - Emit a conversion from the specified type to the specified destination type, both of which are LLVM scalar types.
Definition at line 3391 of file CGExprScalar.cpp.
References hasScalarEvaluationKind().
Referenced by EvaluateExprAsBool().
Value * CodeGenFunction::EmitScalarExpr | ( | const Expr * | E, |
bool | IgnoreResultAssign = false |
||
) |
EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result.
EmitScalarExpr - Emit the computation of the specified expression of scalar type, ignoring the result.
Definition at line 3376 of file CGExprScalar.cpp.
References disableDebugInfo(), enableDebugInfo(), clang::Expr::getType(), and hasScalarEvaluationKind().
Referenced by EmitAnyExpr(), EmitAnyExprToMem(), EmitARCExtendBlockObject(), emitARCRetainCall(), EmitArraySubscriptExpr(), EmitAtomicExpr(), EmitAtomicInit(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitCallExpr(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXDeleteExpr(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitDeclInit(), EmitExtVectorElementExpr(), emitFPIntBuiltin(), EmitIndirectGotoStmt(), EmitInitializerForField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitOMPAlignedClause(), EmitOMPParallelCall(), EmitPointerToDataMemberBinaryExpr(), EmitReturnStmt(), EmitScalarInit(), EmitStoreThroughLValue(), EmitSwitchStmt(), emitTernaryFPBuiltin(), emitUnaryFPBuiltin(), EmitUnaryOpLValue(), EmitVAListRef(), EmitVariablyModifiedType(), emitWritebackArg(), EvaluateExprAsBool(), tryEmitARCRetainLoadOfScalar(), and tryEmitARCRetainScalarExpr().
void CodeGenFunction::EmitScalarInit | ( | const Expr * | init, |
const ValueDecl * | D, | ||
LValue | lvalue, | ||
bool | capturedByInit | ||
) |
Definition at line 599 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, drillIntoBlockVariable(), EmitARCInitWeak(), EmitARCRelease(), EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitARCStoreWeak(), EmitLoadOfScalar(), EmitScalarExpr(), EmitStoreOfScalar(), EmitStoreThroughLValue(), enterFullExpression(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getByRefValueLLVMField(), clang::Expr::getExprLoc(), clang::CodeGen::LValue::getObjCLifetime(), isAccessedBy(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, and clang::CodeGen::LValue::setAddress().
Referenced by EmitAggMemberInitializer(), EmitDeclInit(), EmitExprAsInit(), EmitMaterializeTemporaryExpr(), EmitObjCForCollectionStmt(), and StoreAnyExprIntoOneUnit().
void CodeGenFunction::EmitScalarInit | ( | llvm::Value * | init, |
LValue | lvalue | ||
) |
EmitScalarInit - Initialize the given lvalue with the given object.
Definition at line 707 of file CGDecl.cpp.
References EmitARCInitWeak(), EmitARCRetain(), EmitARCRetainAutorelease(), EmitStoreOfScalar(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getObjCLifetime(), clang::CodeGen::LValue::getType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
llvm::Value * CodeGenFunction::EmitScalarPrePostIncDec | ( | const UnaryOperator * | E, |
LValue | LV, | ||
bool | isInc, | ||
bool | isPre | ||
) |
Definition at line 3412 of file CGExprScalar.cpp.
Referenced by EmitUnaryOpLValue().
void CodeGenFunction::EmitSEHLeaveStmt | ( | const SEHLeaveStmt & | S | ) |
Definition at line 1658 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::ErrorUnsupported().
Referenced by EmitStmt().
void CodeGenFunction::EmitSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 1654 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::ErrorUnsupported().
Referenced by EmitStmt().
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.
Definition at line 245 of file CGStmt.cpp.
References EmitAttributedStmt(), EmitBreakStmt(), EmitCaseStmt(), EmitCompoundStmt(), EmitContinueStmt(), EmitDeclStmt(), EmitDefaultStmt(), EmitGotoStmt(), EmitLabelStmt(), and clang::Stmt::getStmtClass().
Referenced by EmitStmt().
void CodeGenFunction::EmitStartEHSpec | ( | const Decl * | D | ) |
EmitStartEHSpec - Emit the start of the exception spec.
Definition at line 496 of file CGException.cpp.
References EHStack, clang::EST_Dynamic, clang::EST_DynamicNone, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAs(), getContext(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExceptionType(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::FunctionProtoType::getNoexceptSpec(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumExceptions(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::isNoexceptExceptionSpec(), clang::FunctionProtoType::NR_Nothrow, clang::CodeGen::EHScopeStack::pushFilter(), clang::CodeGen::EHScopeStack::pushTerminate(), and clang::CodeGen::EHFilterScope::setFilter().
Referenced by StartFunction().
void CodeGenFunction::EmitStaticVarDecl | ( | const VarDecl & | D, |
llvm::GlobalValue::LinkageTypes | Linkage | ||
) |
Definition at line 332 of file CGDecl.cpp.
References clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenModule::addUsedGlobal(), CGM, clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), EmitVariablyModifiedType(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Type::isVariablyModifiedType(), clang::CodeGenOptions::LimitedDebugInfo, clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), clang::CodeGen::CGDebugInfo::setLocation(), and clang::CodeGen::CodeGenModule::setStaticLocalDeclAddress().
Referenced by EmitAutoVarAlloca(), EmitVarDecl(), and clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl().
void CodeGenFunction::EmitStmt | ( | const Stmt * | S | ) |
EmitStmt - Emit the code for the statement
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 45 of file CGStmt.cpp.
References Builder, ContainsLabel(), EmitAsmStmt(), EmitCapturedStmt(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDoStmt(), EmitForStmt(), EmitIfStmt(), EmitIgnoredExpr(), EmitIndirectGotoStmt(), EmitObjCAtSynchronizedStmt(), EmitObjCAtThrowStmt(), EmitObjCAtTryStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPAtomicDirective(), EmitOMPBarrierDirective(), EmitOMPCriticalDirective(), EmitOMPFlushDirective(), EmitOMPForDirective(), EmitOMPForSimdDirective(), EmitOMPMasterDirective(), EmitOMPOrderedDirective(), EmitOMPParallelDirective(), EmitOMPParallelForDirective(), EmitOMPParallelForSimdDirective(), EmitOMPParallelSectionsDirective(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdDirective(), EmitOMPSingleDirective(), EmitOMPTargetDirective(), EmitOMPTaskDirective(), EmitOMPTaskwaitDirective(), EmitOMPTaskyieldDirective(), EmitOMPTeamsDirective(), EmitReturnStmt(), EmitSEHLeaveStmt(), EmitSEHTryStmt(), EmitSimpleStmt(), EmitStopPoint(), EmitSwitchStmt(), EmitWhileStmt(), EnsureInsertPoint(), clang::CapturedStmt::getCapturedRegionKind(), clang::Stmt::getStmtClass(), HaveInsertPoint(), clang::Stmt::NoStmtClass, 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(), EmitOMPLoopBody(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), ExitCXXTryStmt(), GenerateObjCAtomicSetterCopyHelperFunction(), and generateObjCSetterBody().
LValue CodeGenFunction::EmitStmtExprLValue | ( | const StmtExpr * | E | ) |
Definition at line 3262 of file CGExpr.cpp.
References EmitAnyExprToTemp(), clang::CodeGen::RValue::getAggregateAddr(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitStopPoint | ( | const Stmt * | S | ) |
EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.
Definition at line 35 of file CGStmt.cpp.
References Builder, getDebugInfo(), and clang::Stmt::getLocStart().
Referenced by EmitBreakStmt(), EmitContinueStmt(), EmitCXXForRangeStmt(), EmitDeclStmt(), EmitForStmt(), EmitGotoStmt(), EmitOMPInnerLoop(), 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 1041 of file CGExprComplex.cpp.
Referenced by EmitComplexPrePostIncDec(), EmitExprAsInit(), EmitInitStoreOfNonAggregate(), generateObjCGetterBody(), and InitCatchParam().
void CodeGenFunction::EmitStoreOfScalar | ( | llvm::Value * | Value, |
llvm::Value * | Addr, | ||
bool | Volatile, | ||
unsigned | Alignment, | ||
QualType | Ty, | ||
llvm::MDNode * | TBAAInfo = nullptr , |
||
bool | isInit = false , |
||
QualType | TBAABaseTy = QualType() , |
||
uint64_t | TBAAOffset = 0 |
||
) |
EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
Definition at line 1217 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), EmitAtomicStore(), EmitToMemory(), clang::CharUnits::fromQuantity(), clang::CodeGen::RValue::get(), getContext(), getLLVMContext(), clang::CodeGen::CodeGenModule::getTBAAStructTagInfo(), clang::Type::isAtomicType(), clang::Type::isVectorType(), and clang::CodeGen::LValue::MakeAddr().
Referenced by EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), emitAtomicCmpXchg(), EmitAtomicExpr(), EmitCXXGlobalVarDeclInit(), EmitInitStoreOfNonAggregate(), EmitParmDecl(), EmitScalarInit(), EmitStoreOfScalar(), EmitStoreThroughLValue(), clang::CodeGen::EmitThreadIDAddress(), emitWriteback(), InitCatchParam(), and tryEmitARCRetainLoadOfScalar().
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 1277 of file CGExpr.cpp.
References EmitStoreOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAABaseType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getTBAAOffset(), clang::CodeGen::LValue::getType(), 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.
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 1530 of file CGExpr.cpp.
References Builder, ConvertTypeForMem(), EmitFromMemory(), clang::CodeGen::LValue::getBitFieldAddr(), 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, clang::CodeGen::CGBitFieldInfo::StorageAlignment, and clang::CodeGen::CGBitFieldInfo::StorageSize.
Referenced by EmitStoreThroughLValue().
void CodeGenFunction::EmitStoreThroughExtVectorComponentLValue | ( | RValue | Src, |
LValue | Dst | ||
) |
Definition at line 1601 of file CGExpr.cpp.
References Builder, getAccessedFieldNo(), clang::CodeGen::LValue::getAlignment(), clang::Type::getAs(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::LValue::isVolatileQualified(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitStoreThroughLValue().
void CodeGenFunction::EmitStoreThroughGlobalRegLValue | ( | RValue | Src, |
LValue | Dst | ||
) |
Store of global named registers are always calls to intrinsics.
Definition at line 1676 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), and clang::Type::isPointerType().
Referenced by EmitStoreThroughLValue().
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 1439 of file CGExpr.cpp.
References Builder, CGM, ConvertType(), EmitARCStoreStrong(), EmitARCStoreWeak(), EmitObjCExtendObjectLifetime(), clang::CodeGen::CGObjCRuntime::EmitObjCGlobalAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCIvarAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCStrongCastAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCWeakAssign(), EmitScalarExpr(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getBaseIvarExp(), getContext(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddr(), 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(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitExprAsInit(), EmitInitializerForField(), EmitLambdaExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitScalarInit(), emitWriteback(), and InitCapturedStruct().
LValue CodeGenFunction::EmitStringLiteralLValue | ( | const StringLiteral * | E | ) |
Definition at line 2065 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
void CodeGenFunction::EmitSwitchStmt | ( | const SwitchStmt & | S | ) |
Definition at line 1506 of file CGStmt.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, ConstantFoldsToSimpleInteger(), createBasicBlock(), clang::CodeGen::CodeGenPGO::createBranchWeights(), EmitAutoVarDecl(), EmitBlock(), EmitScalarExpr(), EmitStmt(), FindCaseStatementsForValue(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::SwitchStmt::getBody(), clang::SwitchStmt::getCond(), clang::SwitchStmt::getConditionVariable(), getContext(), clang::CodeGen::RegionCounter::getCount(), getJumpDestInCurrentScope(), clang::SwitchCase::getNextSwitchCase(), getPGORegionCounter(), clang::SwitchStmt::getSwitchCaseList(), clang::CodeGen::CodeGenPGO::haveRegionCounts(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
Referenced by EmitStmt().
void CodeGenFunction::EmitSynthesizedCXXCopyCtor | ( | llvm::Value * | Dest, |
llvm::Value * | Src, | ||
const Expr * | Exp | ||
) |
Definition at line 454 of file CGExprCXX.cpp.
References EmitNullInitialization(), EmitSynthesizedCXXCopyCtorCall(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::Expr::getType(), and clang::CXXConstructExpr::requiresZeroInitialization().
void CodeGenFunction::EmitSynthesizedCXXCopyCtorCall | ( | const CXXConstructorDecl * | D, |
llvm::Value * | This, | ||
llvm::Value * | Src, | ||
const CXXConstructExpr * | E | ||
) |
Definition at line 1785 of file CGClass.cpp.
References clang::CodeGen::RequiredArgs::All, clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), Builder, clang::Type::castAs(), CGM, clang::CodeGen::Complete, clang::CodeGen::CodeGenTypes::ConvertType(), EmitAggregateCopy(), EmitCall(), EmitCallArgs(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::CXXConstructExpr::getNumArgs(), clang::CXXMethodDecl::getThisType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::CXXMethodDecl::isInstance(), and clang::FunctionDecl::isTrivial().
Referenced by EmitSynthesizedCXXCopyCtor().
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 1736 of file CGBuiltin.cpp.
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 1192 of file CGExpr.cpp.
References Builder, ConvertTypeForMem(), getContext(), and hasBooleanRepresentation().
Referenced by EmitStoreOfScalar(), and EmitToInt().
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 2316 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), EmitBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGen::CodeGenModule::getIntrinsic().
Referenced by EmitCheck().
void CodeGenFunction::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
.
Definition at line 467 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), EmitBlock(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitHash16Bytes(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CharUnits::getQuantity(), clang::ASTContext::getSanitizerBlacklist(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSizeInChars(), clang::QualType::getUnqualifiedType(), clang::SanitizerSet::has(), clang::CXXRecordDecl::hasDefinition(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::SanitizerBlacklist::isBlacklistedType(), clang::CXXRecordDecl::isDynamicClass(), clang::Type::isIncompleteType(), clang::MangleContext::mangleCXXRTTI(), sanitizePerformTypeCheck(), SanOpts, clang::CodeGen::CodeGenTypeCache::SizeTy, TCK_DowncastPointer, TCK_DowncastReference, TCK_MemberAccess, TCK_MemberCall, TCK_Upcast, and TCK_UpcastToVirtualBase.
Referenced by commonEmitCXXMemberOrOperatorCall(), EmitCastLValue(), EmitCheckedLValue(), EmitCXXConstructorCall(), EmitCXXMemberPointerCallExpr(), EmitMemberExpr(), EmitReferenceBindingToExpr(), and GetAddressOfBaseClass().
LValue CodeGenFunction::EmitUnaryOpLValue | ( | const UnaryOperator * | E | ) |
Definition at line 2004 of file CGExpr.cpp.
References Builder, EmitComplexPrePostIncDec(), EmitLValue(), EmitScalarExpr(), EmitScalarPrePostIncDec(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::ASTContext::getCanonicalType(), getContext(), getElementType(), getLangOpts(), clang::UnaryOperator::getOpcode(), clang::Type::getPointeeType(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::QualType::isNull(), clang::Expr::isOBJCGCCandidate(), clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::LangOptions::NonGC, clang::UO_Deref, clang::UO_Extension, clang::UO_Imag, clang::UO_PreDec, clang::UO_PreInc, and clang::UO_Real.
Referenced by EmitLValue().
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 775 of file CGExpr.cpp.
References ConvertType(), ErrorUnsupported(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitCastLValue(), EmitConditionalOperatorLValue(), and EmitLValue().
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 769 of file CGExpr.cpp.
References ErrorUnsupported(), clang::Expr::getType(), and GetUndefRValue().
Referenced by EmitAtomicExpr().
llvm::Value * CodeGenFunction::EmitVAArg | ( | llvm::Value * | VAListAddr, |
QualType | Ty | ||
) |
Definition at line 3417 of file CGCall.cpp.
References clang::ABIInfo::EmitVAArg(), clang::CodeGen::CodeGenTypes::getABIInfo(), and clang::CodeGen::CodeGenModule::getTypes().
LValue CodeGenFunction::EmitVAArgExprLValue | ( | const VAArgExpr * | E | ) |
Definition at line 3162 of file CGExpr.cpp.
References EmitAggExprToLValue().
Referenced by EmitLValue().
llvm::Value * CodeGenFunction::EmitVAListRef | ( | const Expr * | E | ) |
Definition at line 1611 of file CodeGenFunction.cpp.
References EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), and getContext().
void CodeGenFunction::EmitVarAnnotations | ( | const VarDecl * | D, |
llvm::Value * | V | ||
) |
Emit local annotations for the local variable V, declared by D.
Definition at line 1665 of file CodeGenFunction.cpp.
References Builder, CGM, EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::Decl::specific_attrs().
Referenced by EmitAutoVarAlloca(), and EmitParmDecl().
void CodeGenFunction::EmitVarDecl | ( | const VarDecl & | D | ) |
EmitVarDecl - Emit a local variable declaration.
This function can be called with a null (unreachable) insert point.
EmitVarDecl - This method handles emission of any variable declaration inside a function, including static vars etc.
Definition at line 126 of file CGDecl.cpp.
References CGM, EmitAutoVarDecl(), EmitStaticVarDecl(), clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::VarDecl::getStorageClass(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::VarDecl::isStaticLocal(), and clang::SC_OpenCLWorkGroupLocal.
Referenced by EmitDecl(), and EmitOMPSimdDirective().
EmitVLASize - Capture all the sizes for the VLA expressions in the given variably-modified type and store them in the VLASizeMap.
This function can be called with a null (unreachable) insert point.
Definition at line 1472 of file CodeGenFunction.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitIgnoredExpr(), EmitScalarExpr(), EnsureInsertPoint(), getContext(), clang::ArrayType::getElementType(), getElementType(), clang::QualType::getSingleStepDesugaredType(), clang::VariableArrayType::getSizeExpr(), clang::QualType::getTypePtr(), clang::SanitizerSet::has(), clang::Type::isVariablyModifiedType(), Paren, Record, SanOpts, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitAutoVarAlloca(), EmitCompoundLiteralLValue(), EmitDecl(), EmitStaticVarDecl(), and StartFunction().
Value * CodeGenFunction::emitVectorWrappedScalar16Intrinsic | ( | unsigned | Int, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
const char * | Name | ||
) |
Definition at line 3886 of file CGBuiltin.cpp.
References Builder.
Value * CodeGenFunction::emitVectorWrappedScalar8Intrinsic | ( | unsigned | Int, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
const char * | Name | ||
) |
Definition at line 3870 of file CGBuiltin.cpp.
References Builder.
void CodeGenFunction::EmitWhileStmt | ( | const WhileStmt & | S, |
ArrayRef< const Attr * > | Attrs = None |
||
) |
Definition at line 677 of file CGStmt.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, AttributeLangSupport::C, createBasicBlock(), clang::CodeGen::CodeGenPGO::createLoopWeights(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), EmitCondBrHints(), EmitStmt(), EmitStopPoint(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::WhileStmt::getBody(), clang::WhileStmt::getCond(), clang::WhileStmt::getConditionVariable(), getJumpDestInCurrentScope(), getPGORegionCounter(), LoopStack, clang::CodeGen::LoopInfoStack::pop(), clang::CodeGen::LoopInfoStack::push(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), and SimplifyForwardingBlocks().
Referenced by EmitAttributedStmt(), and EmitStmt().
Value * CodeGenFunction::EmitX86BuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 5756 of file CGBuiltin.cpp.
References Builder, clang::diag::Error, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), clang::Expr::isIntegerConstantExpr(), clang::Type::isIntegerType(), and Node.
void clang::CodeGen::CodeGenFunction::enableDebugInfo | ( | ) | [inline] |
Definition at line 1079 of file CodeGenFunction.h.
Referenced by EmitScalarExpr().
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 1455 of file CodeGenFunction.h.
References createBasicBlock(), EmitBlock(), and HaveInsertPoint().
Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitCompoundStmtWithoutScope(), EmitOMPCriticalDirective(), 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 2242 of file CGBlocks.cpp.
References clang::LangOptions::GCOnly, and clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitAutoVarCleanups().
void CodeGenFunction::EnterCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 610 of file CGException.cpp.
References AttributeLangSupport::C, createBasicBlock(), EHStack, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CXXCatchStmt::getCaughtType(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CGObjCRuntime::GetEHType(), clang::CXXCatchStmt::getExceptionDecl(), clang::CXXTryStmt::getHandler(), clang::QualType::getNonReferenceType(), clang::CXXTryStmt::getNumHandlers(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ASTContext::getUnqualifiedArrayType(), clang::Type::isObjCObjectPointerType(), clang::CodeGen::EHScopeStack::pushCatch(), clang::CodeGen::EHCatchScope::setCatchAllHandler(), and clang::CodeGen::EHCatchScope::setHandler().
Referenced by EmitConstructorBody(), EmitCXXTryStmt(), and EmitDestructorBody().
void CodeGenFunction::EnterDtorCleanups | ( | const CXXDestructorDecl * | Dtor, |
CXXDtorType | Type | ||
) |
Emit all code that comes at the end of class's destructor. This is to call destructors on members and base classes in reverse order of their construction.
EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor. The end result should call destructors on members and base classes in reverse order of their construction.
Definition at line 1522 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::EHCleanup, EHStack, clang::Type::getAsUnionType(), getCleanupKind(), clang::RecordType::getDecl(), getDestroyer(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::QualType::isDestructedType(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CodeGen::NormalAndEHCleanup, clang::ast_matchers::type, and clang::CXXRecordDecl::vbases().
Referenced by EmitDestructorBody().
void clang::CodeGen::CodeGenFunction::enterFullExpression | ( | const ExprWithCleanups * | E | ) | [inline] |
Definition at line 2579 of file CodeGenFunction.h.
References enterNonTrivialFullExpression(), and clang::ExprWithCleanups::getNumObjects().
Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitLValue(), EmitReturnStmt(), and EmitScalarInit().
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 647 of file CGBlocks.cpp.
References enterBlockScope(), clang::ExprWithCleanups::getNumObjects(), and clang::ExprWithCleanups::getObjects().
Referenced by enterFullExpression().
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 1187 of file CodeGenFunction.cpp.
References CGM, and clang::CodeGen::CodeGenModule::ErrorUnsupported().
Referenced by EmitCXXThrowExpr(), EmitCXXTryStmt(), EmitUnsupportedLValue(), and EmitUnsupportedRValue().
llvm::Value * CodeGenFunction::EvaluateExprAsBool | ( | const Expr * | E | ) |
EvaluateExprAsBool - Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value.
Definition at line 90 of file CGExpr.cpp.
References clang::ASTContext::BoolTy, CGM, EmitComplexExpr(), EmitComplexToScalarConversion(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitScalarConversion(), EmitScalarExpr(), clang::Type::getAs(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Expr::getType(), clang::Type::isAnyComplexType(), and clang::CodeGen::CodeGenPGO::setCurrentStmt().
Referenced by EmitBranchOnBoolExpr(), EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitOMPInnerLoop(), and EmitWhileStmt().
void CodeGenFunction::ExitCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 1209 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::begin(), clang::CodeGen::EHScopeStack::begin(), BeginCatch(), clang::CodeGen::RegionCounter::beginRegion(), Builder, AttributeLangSupport::C, clang::CodeGen::EHCatchScope::clearHandlerBlocks(), createBasicBlock(), CurCodeDecl, EHStack, EmitBlock(), EmitBlockAfterUses(), emitCatchDispatchBlock(), EmitRuntimeCallOrInvoke(), EmitStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CXXTryStmt::getHandler(), clang::CXXCatchStmt::getHandlerBlock(), clang::CXXTryStmt::getNumHandlers(), clang::CodeGen::EHCatchScope::getNumHandlers(), getPGORegionCounter(), getReThrowFn(), clang::CodeGen::EHScope::hasEHBranches(), HaveInsertPoint(), and clang::CodeGen::EHScopeStack::popCatch().
Referenced by EmitConstructorBody(), EmitCXXTryStmt(), and EmitDestructorBody().
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 207 of file CodeGenFunction.cpp.
References AllocaInsertPt, Builder, CGM, CurCodeDecl, CurFnInfo, EHResumeBlock, EHStack, EmitBlock(), EmitEndEHSpec(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitIfUsed(), EmitReturnBlock(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), PopCleanupBlocks(), PrologueCleanupDepth, ReturnBlock, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), EmitCallAndReturnForThunk(), EmitMustTailThunk(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), and GenerateObjCSetter().
llvm::Function * CodeGenFunction::GenerateBlockFunction | ( | GlobalDecl | GD, |
const CGBlockInfo & | Info, | ||
const DeclMapTy & | ldm, | ||
bool | IsLambdaConversionToBlock | ||
) |
Definition at line 1099 of file CGBlocks.cpp.
References clang::CodeGen::RegionCounter::beginRegion(), Builder, clang::BlockDecl::captures(), clang::BlockDecl::capturesCXXThis(), clang::CodeGen::CGBlockInfo::CXXThisIndex, clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::BlockDecl::getBody(), clang::BlockExpr::getBody(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CGBlockInfo::Capture::getConstant(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::FunctionType::getExtInfo(), clang::BlockExpr::getFunctionType(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::CharUnits::getQuantity(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::InternalLinkage, clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::FunctionProtoType::isVariadic(), clang::CodeGenOptions::LimitedDebugInfo, clang::BlockDecl::params(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::CGBlockInfo::UsesStret, and clang::ASTContext::VoidPtrTy.
Referenced by EmitBlockLiteral(), and clang::CodeGen::CodeGenModule::GetAddrOfGlobalBlock().
llvm::Value * CodeGenFunction::GenerateCapturedStmtArgument | ( | const CapturedStmt & | S | ) |
Definition at line 2148 of file CGStmt.cpp.
References clang::CodeGen::LValue::getAddress(), and InitCapturedStruct().
Referenced by EmitOMPParallelDirective().
llvm::Function * CodeGenFunction::GenerateCapturedStmtFunction | ( | const CapturedStmt & | S | ) |
Creates the outlined function for a CapturedStmt.
Definition at line 2155 of file CGStmt.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), Builder, CapturedStmtInfo, CGM, clang::CodeGen::CodeGenPGO::destroyRegionCounters(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), clang::CodeGen::CodeGenPGO::emitInstrumentationData(), EmitLoadOfLValue(), EmitLValueForField(), FinishFunction(), clang::CapturedDecl::getBody(), clang::Decl::getBodyRBrace(), 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::Decl::getLocation(), clang::Stmt::getLocStart(), clang::CapturedStmt::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getThisFieldDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasBody(), clang::InternalLinkage, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::isCXXThisExprCaptured(), MakeNaturalAlignAddrLValue(), clang::CapturedDecl::param_begin(), clang::CapturedDecl::param_end(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::setContextValue(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().
Referenced by EmitCapturedStmt().
llvm::Function* clang::CodeGen::CodeGenFunction::GenerateCapturedStmtFunctionEpilog | ( | const CapturedStmt & | S | ) |
void CodeGenFunction::GenerateCode | ( | GlobalDecl | GD, |
llvm::Function * | Fn, | ||
const CGFunctionInfo & | FnInfo | ||
) |
Definition at line 809 of file CodeGenFunction.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), Builder, clang::CodeGen::CGCXXABI::buildThisParam(), CGM, clang::CodeGen::CodeGenPGO::checkGlobalDecl(), clang::frontend::CPlusPlus, CurFn, CurGD, clang::CodeGen::CodeGenPGO::destroyRegionCounters(), EmitCheck(), EmitCheckSourceLocation(), EmitConstructorBody(), EmitDestructorBody(), clang::CodeGen::CGCUDARuntime::EmitDeviceStubBody(), EmitFunctionBody(), emitImplicitAssignmentOperatorBody(), clang::CodeGen::CodeGenPGO::emitInstrumentationData(), EmitLambdaStaticInvokeFunction(), EmitLambdaToBlockPointerBody(), EmitSizedDeallocationFunction(), FinishFunction(), clang::SourceRange::getBegin(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::FunctionDecl::getCorrespondingUnsizedGlobalDeallocationFunction(), clang::CodeGen::CodeGenModule::getCUDARuntime(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::SourceRange::getEnd(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::CXXMethodDecl::getThisType(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::FunctionDecl::hasImplicitReturnZero(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::FunctionDecl::isDefaulted(), clang::CXXMethodDecl::isInstance(), clang::Type::isVoidType(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), SanOpts, SawAsmBlock, StartFunction(), TryMarkNoThrow(), and clang::ASTContext::VoidPtrTy.
Referenced by clang::CodeGen::CodeGenModule::codegenCXXStructor().
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 1293 of file CGBlocks.cpp.
References clang::CodeGen::BLOCK_FIELD_IS_BLOCK, clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_OBJECT, clang::CodeGen::BLOCK_FIELD_IS_WEAK, Builder, AttributeLangSupport::C, clang::BlockDecl::captures(), clang::FunctionDecl::Create(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::InternalLinkage, 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::CGBlockInfo::StructureType, 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 | ||
) |
GenerateCXXGlobalDtorsFunc - Generates code for destroying global variables.
Definition at line 524 of file CGDeclCXX.cpp.
References Builder, clang::CodeGen::ArtificialLocation::Emit(), FinishFunction(), getContext(), getTypes(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::GenerateCXXGlobalInitFunc | ( | llvm::Function * | Fn, |
ArrayRef< llvm::Function * > | CXXThreadLocals, | ||
llvm::GlobalVariable * | Guard = nullptr |
||
) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
Definition at line 473 of file CGDeclCXX.cpp.
References Builder, clang::frontend::CPlusPlus, createBasicBlock(), clang::CodeGen::ArtificialLocation::Emit(), EmitBlock(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPush(), EmitRuntimeCall(), FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), getContext(), getLangOpts(), getTypes(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc | ( | llvm::Function * | Fn, |
const VarDecl * | D, | ||
llvm::GlobalVariable * | Addr, | ||
bool | PerformInit | ||
) |
Emit the code necessary to initialize the given global variable.
Definition at line 447 of file CGDeclCXX.cpp.
References EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), FinishFunction(), getContext(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), getTypes(), clang::Decl::hasAttr(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
llvm::Function * CodeGenFunction::generateDestroyHelper | ( | llvm::Constant * | addr, |
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray, | ||
const VarDecl * | VD | ||
) |
generateDestroyHelper - Generates a helper function which, when invoked, destroys the given object.
Definition at line 550 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), CGM, clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), emitDestroy(), FinishFunction(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getTypes(), StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitDeclDestroy(), and pushTemporaryCleanup().
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 1469 of file CGBlocks.cpp.
References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::BLOCK_FIELD_IS_BLOCK, clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_OBJECT, clang::CodeGen::BLOCK_FIELD_IS_WEAK, Builder, clang::BlockDecl::captures(), clang::FunctionDecl::Create(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::Qualifiers::hasStrongOrWeakObjCLifetime(), clang::InternalLinkage, clang::Type::isBlockPointerType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCWeak(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_Weak, clang::SC_Static, clang::CodeGen::CGBlockInfo::StructureType, 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 2946 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), AttributeLangSupport::C, clang::frontend::CPlusPlus, clang::CXXConstructExpr::Create(), clang::FunctionDecl::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(), StartFunction(), clang::UO_Deref, 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 2869 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionDeclaration(), AttributeLangSupport::C, clang::frontend::CPlusPlus, clang::FunctionDecl::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(), StartFunction(), clang::UO_Deref, 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 | ||
) |
Definition at line 1355 of file CGObjC.cpp.
References AutoreleaseResult, Builder, clang::CodeGen::CodeGenTypes::ConvertType(), clang::ObjCMethodDecl::createImplicitParams(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), emitCXXDestructMethod(), EmitLValueForIvar(), FinishFunction(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::ObjCImplDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getContext(), clang::ObjCMethodDecl::getLocStart(), clang::ASTContext::getObjCIdType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCImplementationDecl::inits(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, LoadObjCSelf(), StartObjCMethod(), and TypeOfSelfObject().
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 745 of file CGObjC.cpp.
References FinishFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), generateObjCGetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::ObjCMethodDecl::getLocStart(), clang::ObjCPropertyImplDecl::getPropertyDecl(), and StartObjCMethod().
void CodeGenFunction::generateObjCGetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
const ObjCMethodDecl * | GetterMothodDecl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 815 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, AutoreleaseResult, clang::ASTContext::BoolTy, Builder, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), EmitAggregateCopy(), emitARCRetainLoadOfScalar(), EmitCall(), emitCPPObjectAtomicGetterCall(), EmitIvarOffset(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForIvar(), EmitReturnStmt(), EmitStoreOfComplex(), emitStructGetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), getEvaluationKind(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), clang::ObjCPropertyDecl::getGetterMethodDecl(), getLLVMContext(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), 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(), MakeNaturalAlignAddrLValue(), clang::Qualifiers::OCL_Weak, ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, 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 503 of file CGObjC.cpp.
References clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::CodeGen::RegionCounter::beginRegion(), Builder, CurFn, clang::CodeGen::CodeGenPGO::destroyRegionCounters(), EmitCompoundStmtWithoutScope(), clang::CodeGen::CodeGenPGO::emitInstrumentationData(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::Decl::getBodyRBrace(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getLocStart(), getPGORegionCounter(), and StartObjCMethod().
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
void CodeGenFunction::GenerateObjCSetter | ( | ObjCImplementationDecl * | IMP, |
const ObjCPropertyImplDecl * | PID | ||
) |
Generate an Objective-C property setter function.
GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.
The given Decl must be an ObjCImplementationDecl. @synthesize is illegal within a category.
Definition at line 1274 of file CGObjC.cpp.
References FinishFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getLocStart(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyDecl::getSetterMethodDecl(), and StartObjCMethod().
void CodeGenFunction::generateObjCSetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 1093 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, clang::BO_Assign, clang::ASTContext::BoolTy, Builder, clang::CK_AnyPointerToBlockPointerCast, clang::CK_BitCast, clang::CK_BlockPointerToObjCPointerCast, clang::CK_CPointerToObjCPointerCast, clang::CK_LValueToRValue, clang::CK_NoOp, EmitCall(), emitCPPObjectAtomicSetterCall(), EmitIvarOffset(), EmitLValueForIvar(), EmitStmt(), emitStructSetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), 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(), TypeOfSelfObject(), UseOptimizedSetter(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by GenerateObjCSetter().
void CodeGenFunction::GenerateThunk | ( | llvm::Function * | Fn, |
const CGFunctionInfo & | FnInfo, | ||
GlobalDecl | GD, | ||
const ThunkInfo & | Thunk | ||
) |
GenerateThunk - Generate a thunk for the given method.
Definition at line 369 of file CGVTables.cpp.
References clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), CGM, EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenModule::setFunctionLinkage(), setThunkVisibility(), and StartThunk().
void CodeGenFunction::GenerateVarArgsThunk | ( | llvm::Function * | Fn, |
const CGFunctionInfo & | FnInfo, | ||
GlobalDecl | GD, | ||
const ThunkInfo & | Thunk | ||
) |
Definition at line 126 of file CGVTables.cpp.
References Builder, CGM, CurFn, clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isVariadic(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), clang::ThunkInfo::Return, clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), and clang::ThunkInfo::This.
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 442 of file CGExpr.cpp.
Referenced by EmitExtVectorElementLValue(), EmitLoadOfExtVectorElementLValue(), and EmitStoreThroughExtVectorComponentLValue().
llvm::Value * CodeGenFunction::GetAddressOfBaseClass | ( | llvm::Value * | 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.
Definition at line 137 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), Builder, CGM, ComputeNonVirtualBaseClassOffset(), ConvertType(), createBasicBlock(), EmitBlock(), EmitTypeCheck(), clang::ASTContext::getASTRecordLayout(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ASTContext::getRecordType(), clang::ASTContext::getTypeAlignInChars(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CGCXXABI::GetVirtualBaseClassOffset(), clang::Decl::hasAttr(), clang::CharUnits::isZero(), sanitizePerformTypeCheck(), TCK_Upcast, and TCK_UpcastToVirtualBase.
Referenced by EmitCastLValue(), and EmitMaterializeTemporaryExpr().
llvm::Value * CodeGenFunction::GetAddressOfDerivedClass | ( | llvm::Value * | Value, |
const CXXRecordDecl * | Derived, | ||
CastExpr::path_const_iterator | PathBegin, | ||
CastExpr::path_const_iterator | PathEnd, | ||
bool | NullCheckValue | ||
) |
Definition at line 242 of file CGClass.cpp.
References Builder, CGM, ConvertType(), createBasicBlock(), EmitBlock(), clang::ASTContext::getCanonicalType(), getContext(), clang::CodeGen::CodeGenModule::GetNonVirtualBaseClassOffset(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitCastLValue().
llvm::Value * CodeGenFunction::GetAddressOfDirectBaseInCompleteClass | ( | llvm::Value * | 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 83 of file CGClass.cpp.
References Builder, ConvertType(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), getElementType(), clang::ASTRecordLayout::getVBaseClassOffset(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitBaseInitializer().
llvm::Value * CodeGenFunction::GetAddrOfBlockDecl | ( | const VarDecl * | var, |
bool | ByRef | ||
) |
Definition at line 994 of file CGBlocks.cpp.
References Builder, clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::NamedDecl::getNameAsString(), clang::ValueDecl::getType(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), and clang::Type::isReferenceType().
Referenced by EmitDeclRefLValue(), and EmitLambdaBlockInvokeBody().
llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel | ( | const LabelDecl * | L | ) |
Definition at line 1322 of file CodeGenFunction.cpp.
References CurFn, clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), GetIndirectGotoBlock(), and getJumpDestForLabel().
llvm::Value* clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar | ( | const VarDecl * | VD | ) | [inline] |
GetAddrOfLocalVar - Return the address of a local variable.
Definition at line 1585 of file CodeGenFunction.h.
Referenced by EmitAggMemberInitializer(), EmitMemberInitializer(), EmitMustTailThunk(), EmitOMPFirstprivateClause(), EmitOMPPrivateClause(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), clang::CodeGen::CGCXXABI::EmitThisParam(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), generateByrefCopyHelper(), generateByrefDisposeHelper(), and tryRemoveRetainOfSelf().
Retrieves the default cleanup kind for an ARC cleanup. Except under -fobjc-arc-eh, ARC cleanups are normal-only.
Definition at line 2411 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().
unsigned CodeGenFunction::getByRefValueLLVMField | ( | const ValueDecl * | VD | ) | const |
getByrefValueFieldNumber - Given a declaration, returns the LLVM field number that holds the value.
Definition at line 1992 of file CGBlocks.cpp.
Referenced by EmitScalarInit(), and clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress().
CleanupKind clang::CodeGen::CodeGenFunction::getCleanupKind | ( | QualType::DestructionKind | kind | ) | [inline] |
Definition at line 1171 of file CodeGenFunction.h.
References needsEHCleanup(), clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by emitCXXDestructMethod(), EnterDtorCleanups(), and pushDestroy().
ASTContext& clang::CodeGen::CodeGenFunction::getContext | ( | ) | const [inline] |
Definition at line 1072 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getContext().
Referenced by AddDirectArgument(), AdjustRelatedResultType(), CheckAggExprForMemSetUse(), commonEmitCXXMemberOrOperatorCall(), ConstantFoldsToSimpleInteger(), ConvertType(), CreateAggTemp(), CreateIRTemp(), CreateMemTemp(), EmitAArch64TblBuiltinExpr(), EmitAggMemberInitializer(), EmitAggregateCopy(), EmitAnyExprToMem(), emitArrayLength(), EmitArraySubscriptExpr(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAtomicExpr(), EmitAtomicLoad(), EmitAtomicStore(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitBlockCopyAndAutorelease(), EmitBuiltinNewDeleteCall(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallArgs(), EmitCapturedFieldLValue(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastLValue(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitComplexPrePostIncDec(), EmitCompoundStmt(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXConstructorCall(), EmitCXXDeleteExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefLValue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDeleteCall(), emitDestroy(), EmitDestructorBody(), EmitEndEHSpec(), EmitFromMemory(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitInitializerForField(), EmitLambdaBlockInvokeBody(), EmitLambdaDelegatingInvokeBody(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitMemberInitializer(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCForCollectionStmt(), EmitObjCIvarRefLValue(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitOMPFirstprivateClause(), clang::CodeGen::EmitOMPSerialCall(), clang::CodeGen::EmitOpenMPUpdateLocation(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitReturnStmt(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtor(), EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::EmitThreadIDAddress(), EmitToMemory(), EmitTypeCheck(), EmitUnaryOpLValue(), EmitVAArgFromMemory(), EmitVAListRef(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getItaniumDynamicCastFn(), GetNumNonZeroBytesInInit(), getRangeForType(), getVLASize(), GetVTTParameter(), InitCapturedStruct(), InitCatchParam(), InitializeVTablePointers(), isCheapEnoughToEvaluateUnconditionally(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), performBaseAdjustment(), performTypeAdjustment(), StartFunction(), StartThunk(), StoreAnyExprIntoOneUnit(), tryEmitAsConstant(), and TypeOfSelfObject().
CGDebugInfo* clang::CodeGen::CodeGenFunction::getDebugInfo | ( | ) | [inline] |
Definition at line 1073 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca(), EmitCallExpr(), EmitConstructorBody(), EmitDecl(), EmitDeclRefExprDbgValue(), EmitLandingPad(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPSimdDirective(), EmitParmDecl(), EmitStaticVarDecl(), EmitStopPoint(), FinishFunction(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), StartFunction(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
CodeGenFunction::Destroyer * CodeGenFunction::getDestroyer | ( | QualType::DestructionKind | destructionKind | ) |
Definition at line 1340 of file CGDecl.cpp.
References destroyARCStrongPrecise, destroyARCWeak, destroyCXXObject, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_objc_strong_lifetime, and clang::QualType::DK_objc_weak_lifetime.
Referenced by EmitArrayDelete(), emitAutoVarTypeCleanup(), emitCXXDestructMethod(), EmitDeclDestroy(), EmitNewArrayInitializer(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), enterBlockScope(), EnterDtorCleanups(), pushDestroy(), and pushEHDestroy().
llvm::BasicBlock * CodeGenFunction::getEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 643 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, createBasicBlock(), EHStack, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), getEHResumeBlock(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScope::getKind(), clang::CodeGen::EHCatchScope::getNumHandlers(), getTerminateHandler(), clang::CodeGen::EHCatchScope::Handler::isCatchAll(), clang::CodeGen::EHScope::setCachedEHDispatchBlock(), clang::CodeGen::EHScopeStack::stable_end(), and clang::CodeGen::EHScope::Terminate.
Referenced by emitCatchDispatchBlock(), and EmitLandingPad().
llvm::BasicBlock * CodeGenFunction::getEHResumeBlock | ( | bool | isCleanup | ) |
Definition at line 1616 of file CGException.cpp.
References Builder, createBasicBlock(), EHResumeBlock, EmitRuntimeCall(), getCatchallRethrowFn(), getExceptionFromSlot(), getSelectorFromSlot(), and NULL.
Referenced by emitFilterDispatchBlock(), and getEHDispatchBlock().
Definition at line 412 of file CGException.cpp.
References CreateTempAlloca(), EHSelectorSlot, and clang::CodeGen::CodeGenTypeCache::Int32Ty.
Referenced by EmitLandingPad(), and getSelectorFromSlot().
TypeEvaluationKind CodeGenFunction::getEvaluationKind | ( | QualType | T | ) | [static] |
hasAggregateLLVMType - Return true if the specified AST type will map into an aggregate LLVM type or is void.
Definition at line 103 of file CodeGenFunction.cpp.
References clang::QualType::getCanonicalType(), clang::Type::getTypeClass(), Record, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.
Referenced by convertTempToRValue(), EmitAggMemberInitializer(), EmitAnyExpr(), EmitAnyExprToMem(), EmitBinaryOperatorLValue(), EmitDeclInit(), EmitExprAsInit(), EmitInitializerForField(), EmitMaterializeTemporaryExpr(), EmitReturnStmt(), EmitRValueForField(), generateObjCGetterBody(), GetUndefRValue(), hasAggregateEvaluationKind(), hasScalarEvaluationKind(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
Returns the contents of the function's exception object and selector slots.
Definition at line 418 of file CGException.cpp.
References Builder, and getExceptionSlot().
Referenced by BeginCatch(), emitFilterDispatchBlock(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getEHResumeBlock(), getTerminateHandler(), and InitCatchParam().
Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.
Definition at line 406 of file CGException.cpp.
References CreateTempAlloca(), ExceptionSlot, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitLandingPad(), and getExceptionFromSlot().
llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock | ( | ) |
Definition at line 1334 of file CodeGenFunction.cpp.
References createBasicBlock(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitIndirectGotoStmt(), and GetAddrOfLabel().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::getInvokeDest | ( | ) | [inline] |
Definition at line 1107 of file CodeGenFunction.h.
References EHStack, getInvokeDestImpl(), and clang::CodeGen::EHScopeStack::requiresLandingPad().
llvm::BasicBlock * CodeGenFunction::getInvokeDestImpl | ( | ) |
Definition at line 702 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), EHStack, EmitLandingPad(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::EHScope::getCachedLandingPad(), clang::CodeGen::CodeGenModule::getLangOpts(), isNonEHScope(), and clang::CodeGen::EHScopeStack::requiresLandingPad().
Referenced by getInvokeDest().
getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
Definition at line 394 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] |
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 670 of file CodeGenFunction.h.
References EHStack, clang::CodeGen::EHScopeStack::getInnermostNormalCleanup(), and NextCleanupDestIndex.
Referenced by EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitLabel(), EmitObjCForCollectionStmt(), EmitOMPInnerLoop(), EmitOMPLoopBody(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), getJumpDestInCurrentScope(), and StartFunction().
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 679 of file CodeGenFunction.h.
References createBasicBlock(), and getJumpDestInCurrentScope().
const LangOptions& clang::CodeGen::CodeGenFunction::getLangOpts | ( | ) | const [inline] |
Definition at line 1085 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by AddInitializerToStaticVarDecl(), CanDevirtualizeMemberFunctionCall(), CheckAggExprForMemSetUse(), EmitAggregateCopy(), EmitArraySubscriptExpr(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitCall(), EmitCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCallExpr(), EmitDeclRefLValue(), EmitDestructorBody(), EmitGlobalVarDeclLValue(), EmitMaterializeTemporaryExpr(), EmitNullInitialization(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitObjectDelete(), emitPointerArithmetic(), EmitReturnStmt(), EmitUnaryOpLValue(), GenerateCode(), GenerateCXXGlobalInitFunc(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), getRangeForType(), needsEHCleanup(), pushTemporaryCleanup(), StartFunction(), tryEmitARCRetainLoadOfScalar(), and ~CodeGenFunction().
llvm::LLVMContext& clang::CodeGen::CodeGenFunction::getLLVMContext | ( | ) | [inline] |
Definition at line 1113 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLLVMContext().
Referenced by AddDirectArgument(), createBasicBlock(), EmitAggregateCopy(), EmitARCRetainAutoreleasedReturnValue(), EmitAsmStmt(), EmitAtomicExpr(), EmitAtomicStore(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitCastToVoidPtr(), EmitCheck(), EmitCheckTypeDescriptor(), EmitCheckValue(), EmitComplexPrePostIncDec(), EmitLoadOfScalar(), EmitLValueForField(), EmitMustTailThunk(), EmitStoreOfScalar(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), generateObjCGetterBody(), generateObjCSetterBody(), getAsmSrcLocInfo(), getItaniumDynamicCastFn(), getUnreachableBlock(), and SetFPAccuracy().
Definition at line 1133 of file CGCleanup.cpp.
References Builder.
Referenced by ResolveAllBranchFixups(), and TransitionToCleanupSwitch().
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 1593 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
Referenced by EmitOpaqueValueLValue().
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 1604 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
RegionCounter clang::CodeGen::CodeGenFunction::getPGORegionCounter | ( | const Stmt * | S | ) | [inline] |
Get a counter for instrumentation of the region associated with the given statement.
Definition at line 940 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitBranchOnBoolExpr(), EmitCaseStmt(), EmitCaseStmtRange(), EmitConditionalOperatorLValue(), EmitConstructorBody(), EmitCXXForRangeStmt(), EmitDefaultStmt(), EmitDestructorBody(), EmitDoStmt(), EmitForStmt(), EmitFunctionBody(), EmitIfStmt(), EmitLabel(), EmitObjCForCollectionStmt(), EmitOMPInnerLoop(), EmitOMPSimdDirective(), EmitSwitchStmt(), EmitWhileStmt(), ExitCXXTryStmt(), and GenerateObjCMethod().
Definition at line 422 of file CGException.cpp.
References Builder, and getEHSelectorSlot().
Referenced by emitCatchDispatchBlock(), emitFilterDispatchBlock(), and getEHResumeBlock().
const TargetInfo& clang::CodeGen::CodeGenFunction::getTarget | ( | ) | const [inline] |
Definition at line 1112 of file CodeGenFunction.h.
References Target.
Referenced by deactivateArgCleanupsBeforeCall(), EmitAsmStmt(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitDestructorBody(), emitGlobalDtorWithCXAAtExit(), EmitMCountInstrumentation(), EmitParmDecl(), getAsmSrcLocInfo(), and GetNumNonZeroBytesInInit().
llvm::BasicBlock * CodeGenFunction::getTerminateHandler | ( | ) |
getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate. This is used when a terminate scope encloses a try.
Definition at line 1589 of file CGException.cpp.
References Builder, createBasicBlock(), EmitNounwindRuntimeCall(), getClangCallTerminateFn(), getExceptionFromSlot(), getTerminateFn(), and useClangCallTerminate().
Referenced by getEHDispatchBlock().
llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad | ( | ) |
getTerminateLandingPad - Return a landing pad that just calls terminate.
Definition at line 1555 of file CGException.cpp.
References Builder, createBasicBlock(), EmitNounwindRuntimeCall(), getCatchAllValue(), getClangCallTerminateFn(), getOpaquePersonalityFn(), getTerminateFn(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, NULL, and useClangCallTerminate().
Referenced by EmitLandingPad().
CodeGenTypes& clang::CodeGen::CodeGenFunction::getTypes | ( | ) | const [inline] |
Definition at line 1071 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getTypes().
Referenced by EmitCall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitDeclDestroy(), EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), EmitLambdaDelegatingInvokeBody(), emitStructGetterCall(), emitStructSetterCall(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateObjCGetterBody(), generateObjCSetterBody(), GetNumNonZeroBytesInInit(), and isSimpleZero().
GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
Definition at line 743 of file CGExpr.cpp.
References clang::Type::castAs(), ConvertType(), CreateMemTemp(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getComplex(), clang::ComplexType::getElementType(), getEvaluationKind(), clang::Type::isVoidType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitUnsupportedRValue().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::getUnreachableBlock | ( | ) | [inline] |
Definition at line 1099 of file CodeGenFunction.h.
References createBasicBlock(), and getLLVMContext().
Referenced by destroyOptimisticNormalEntry(), and clang::CodeGen::CodeGenFunction::FinallyInfo::enter().
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 1449 of file CodeGenFunction.cpp.
References Builder, getContext(), clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by emitArrayLength(), EmitArraySubscriptExpr(), EmitAutoVarAlloca(), EmitNullInitialization(), emitPointerArithmetic(), getArrayIndexingBound(), and getVLASize().
std::pair< llvm::Value *, QualType > CodeGenFunction::getVLASize | ( | QualType | vla | ) |
Definition at line 1442 of file CodeGenFunction.cpp.
References clang::ASTContext::getAsVariableArrayType(), getContext(), and getVLASize().
llvm::Value * CodeGenFunction::GetVTablePtr | ( | llvm::Value * | This, |
llvm::Type * | Ty | ||
) |
GetVTablePtr - Return the Value of the vtable pointer member pointed to by This.
Definition at line 2067 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), and clang::CodeGen::CodeGenModule::getTBAAInfoForVTablePtr().
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 299 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().
Referenced by EmitDelegateCXXConstructorCall().
static bool clang::CodeGen::CodeGenFunction::hasAggregateEvaluationKind | ( | QualType | T | ) | [inline, static] |
Definition at line 1397 of file CodeGenFunction.h.
References getEvaluationKind(), and clang::CodeGen::TEK_Aggregate.
Referenced by EmitAggExpr(), EmitAggExprToLValue(), EmitAnyExprToTemp(), EmitCompoundStmtWithoutScope(), EmitConditionalOperatorLValue(), emitPseudoObjectExpr(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
static bool clang::CodeGen::CodeGenFunction::hasScalarEvaluationKind | ( | QualType | T | ) | [inline, static] |
Definition at line 1393 of file CodeGenFunction.h.
References getEvaluationKind(), and clang::CodeGen::TEK_Scalar.
Referenced by EmitAsmStmt(), EmitCallAndReturnForThunk(), EmitComplexToScalarConversion(), EmitForwardingCallToLambda(), EmitFunctionProlog(), EmitParmDecl(), EmitScalarConversion(), EmitScalarExpr(), isAggregateTypeForABI(), and StartFunction().
bool clang::CodeGen::CodeGenFunction::hasVolatileMember | ( | QualType | T | ) | [inline] |
hasVolatileMember - returns true if aggregate type has a volatile member.
Definition at line 1551 of file CodeGenFunction.h.
References clang::Type::getAs(), and clang::RecordDecl::hasVolatileMember().
Referenced by EmitAggregateAssign().
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 1447 of file CodeGenFunction.h.
References Builder.
Referenced by EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBlockWithFallThrough(), EmitBreakStmt(), EmitCleanup(), EmitContinueStmt(), EmitDeclStmt(), EmitGotoStmt(), EmitStmt(), EnsureInsertPoint(), enterBlockScope(), ExitCXXTryStmt(), and protectFromPeepholes().
bool CodeGenFunction::IndirectObjCSetterArg | ( | const CGFunctionInfo & | FI | ) |
Definition at line 1390 of file CGObjC.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::ABIArgInfo::getKind(), and clang::CodeGen::ABIArgInfo::Indirect.
LValue CodeGenFunction::InitCapturedStruct | ( | const CapturedStmt & | S | ) |
Definition at line 2105 of file CGStmt.cpp.
References clang::CapturedStmt::capture_init_begin(), clang::CapturedStmt::capture_init_end(), CreateMemTemp(), EmitInitializerForField(), EmitLValueForFieldInitialization(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CapturedStmt::getCapturedRecordDecl(), getContext(), clang::ASTContext::getRecordType(), and MakeNaturalAlignAddrLValue().
Referenced by EmitCapturedStmt(), and GenerateCapturedStmtArgument().
void CodeGenFunction::initFullExprCleanup | ( | ) |
Set up the last cleaup that was pushed as a conditional full-expression cleanup.
Definition at line 252 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::begin(), Builder, CreateTempAlloca(), EHStack, clang::CodeGen::EHCleanupScope::getActiveFlag(), clang::CodeGen::EHCleanupScope::isEHCleanup(), clang::CodeGen::EHCleanupScope::isNormalCleanup(), clang::CodeGen::EHCleanupScope::setActiveFlag(), setBeforeOutermostConditional(), clang::CodeGen::EHCleanupScope::setTestFlagInEHCleanup(), and clang::CodeGen::EHCleanupScope::setTestFlagInNormalCleanup().
Referenced by EnterNewDeleteCleanup(), pushCleanupAfterFullExpr(), and pushFullExprCleanup().
void CodeGenFunction::InitializeVTablePointer | ( | BaseSubobject | Base, |
const CXXRecordDecl * | NearestVBase, | ||
CharUnits | OffsetFromNearestVBase, | ||
const CXXRecordDecl * | VTableClass | ||
) |
InitializeVTablePointer - Initialize the vtable pointer of the given subobject.
Definition at line 1948 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), clang::BaseSubobject::getBaseOffset(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getTBAAInfoForVTablePtr(), clang::CodeGen::CGCXXABI::GetVirtualBaseClassOffset(), clang::CodeGen::CGCXXABI::getVTableAddressPointInStructor(), clang::CharUnits::isZero(), LoadCXXThis(), and clang::CharUnits::Zero().
Referenced by InitializeVTablePointers().
void CodeGenFunction::InitializeVTablePointers | ( | BaseSubobject | Base, |
const CXXRecordDecl * | NearestVBase, | ||
CharUnits | OffsetFromNearestVBase, | ||
bool | BaseIsNonVirtualPrimaryBase, | ||
const CXXRecordDecl * | VTableClass, | ||
VisitedVirtualBasesSetTy & | VBases | ||
) |
Definition at line 1994 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), clang::ASTContext::getASTRecordLayout(), clang::BaseSubobject::getBase(), clang::ASTRecordLayout::getBaseClassOffset(), clang::BaseSubobject::getBaseOffset(), getContext(), clang::ASTRecordLayout::getPrimaryBase(), clang::ASTRecordLayout::getVBaseClassOffset(), InitializeVTablePointer(), clang::CXXRecordDecl::isDynamicClass(), and clang::CharUnits::Zero().
Referenced by EmitBaseInitializer(), EmitCtorPrologue(), EmitDestructorBody(), and InitializeVTablePointers().
void CodeGenFunction::InitializeVTablePointers | ( | const CXXRecordDecl * | ClassDecl | ) |
Definition at line 2051 of file CGClass.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), clang::CodeGen::CGCXXABI::initializeHiddenVirtualInheritanceMembers(), InitializeVTablePointers(), clang::CXXRecordDecl::isDynamicClass(), and clang::CharUnits::Zero().
void CodeGenFunction::InitTempAlloca | ( | llvm::AllocaInst * | Alloca, |
llvm::Value * | Value | ||
) |
InitTempAlloca - Provide an initial value for the given alloca.
Definition at line 63 of file CGExpr.cpp.
References AllocaInsertPt.
Referenced by clang::CodeGen::EmitOMPSerialCall().
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 1707 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::SanitizerMetadata::disableSanitizerForInstruction(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::CodeGen::LoopInfoStack::InsertHelper(), IsSanitizerScope, and LoopStack.
Referenced by clang::CodeGen::CGBuilderInserter< PreserveNames >::InsertHelper().
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 730 of file CodeGenFunction.h.
Referenced by EnterNewDeleteCleanup(), pushCleanupAfterFullExpr(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), setBeforeOutermostConditional(), and SetupCleanupBlockActivation().
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 891 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().
Referenced by EmitCaseStmt().
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 1072 of file CGDecl.cpp.
Referenced by AllTrivialInitializers(), EmitAutoVarInit(), and EmitOMPAggregateAssign().
Definition at line 1398 of file CGObjC.cpp.
References clang::Type::getAs(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::QualType::getTypePtr(), and clang::LangOptions::NonGC.
llvm::Value* clang::CodeGen::CodeGenFunction::LoadBlockStruct | ( | ) | [inline] |
Definition at line 1238 of file CodeGenFunction.h.
References BlockPointer.
LoadCXXStructorImplicitParam - Load the implicit parameter for a constructor/destructor.
Definition at line 1668 of file CodeGenFunction.h.
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 1652 of file CodeGenFunction.h.
Referenced by EmitAsanPrologueOrEpilogue(), EmitBaseInitializer(), EmitCallAndReturnForThunk(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), EmitMemberInitializer(), and InitializeVTablePointer().
llvm::Value* clang::CodeGen::CodeGenFunction::LoadCXXVTT | ( | ) | [inline] |
LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
Definition at line 1661 of file CodeGenFunction.h.
Referenced by GetVTTParameter().
LoadObjCSelf - Load the value of self. This function is only valid while generating code for an Objective-C method.
Definition at line 1406 of file CGObjC.cpp.
References CurCodeDecl, CurFuncDecl, EmitDeclRefLValue(), EmitLoadOfScalar(), clang::ValueDecl::getType(), and clang::VK_LValue.
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructMethod(), EmitObjCMessageExpr(), emitStructGetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
Function * CodeGenFunction::LookupNeonLLVMIntrinsic | ( | unsigned | IntrinsicID, |
unsigned | Modifier, | ||
llvm::Type * | ArgTy, | ||
const CallExpr * | E | ||
) |
Definition at line 2513 of file CGBuiltin.cpp.
References Add1ArgType, Add2ArgTypes, AddRetType, clang::CallExpr::getCallReturnType(), InventFloatType, Use128BitVectors, Use64BitVectors, VectorizeArgTypes, and VectorizeRetType.
Referenced by EmitCommonNeonSISDBuiltinExpr().
LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue | ( | llvm::Value * | V, |
QualType | T, | ||
CharUnits | Alignment = CharUnits() |
||
) | [inline] |
Definition at line 1468 of file CodeGenFunction.h.
References CGM, getContext(), clang::CodeGen::CodeGenModule::getTBAAInfo(), and clang::CodeGen::LValue::MakeAddr().
Referenced by EmitAggExprToLValue(), EmitAnyExprToMem(), EmitArraySubscriptExpr(), EmitAsmStmt(), emitAtomicCmpXchg(), EmitAtomicExpr(), EmitAutoVarInit(), EmitCallExprLValue(), EmitCastLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXTypeidLValue(), EmitCXXUuidofLValue(), EmitDeclInit(), EmitDeclRefLValue(), EmitExtVectorElementExpr(), EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitInitializerForField(), EmitLambdaExpr(), EmitLambdaLValue(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMaterializeTemporaryExpr(), EmitObjCEncodeExprLValue(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), EmitParmDecl(), EmitPointerToDataMemberBinaryExpr(), EmitPredefinedLValue(), emitPseudoObjectExpr(), EmitStmtExprLValue(), EmitStringLiteralLValue(), EmitThreadPrivateVarDeclLValue(), EmitUnaryOpLValue(), EmitUnsupportedLValue(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
Definition at line 83 of file CodeGenFunction.cpp.
References CGM, clang::CharUnits::fromQuantity(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ASTContext::getLangOpts(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTBAAInfo(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::isAlignmentRequired(), clang::CodeGen::CGCXXABI::isTypeInfoCalculable(), and clang::CodeGen::LValue::MakeAddr().
Referenced by convertTempToRValue(), EmitAnyExprToMem(), EmitArraySubscriptExpr(), EmitCapturedFieldLValue(), EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), EmitLValueForLambdaField(), EmitMemberExpr(), EmitMemberInitializer(), EmitObjCIsaExpr(), EmitOMPFirstprivateClause(), EmitReturnStmt(), clang::CodeGen::EmitThreadIDAddress(), EmitUnaryOpLValue(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), emitWritebackArg(), GenerateCapturedStmtFunction(), generateObjCGetterBody(), clang::CodeGen::GetOpenMPThreadID(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), InitCapturedStruct(), and InitCatchParam().
bool clang::CodeGen::CodeGenFunction::needsEHCleanup | ( | QualType::DestructionKind | kind | ) | [inline] |
Determines whether an EH cleanup is required to destroy a type with the given destruction kind.
Definition at line 1157 of file CodeGenFunction.h.
References CGM, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and getLangOpts().
Referenced by EmitArrayDelete(), EmitDeclDestroy(), EmitInitializerForField(), EmitNewArrayInitializer(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), enterBlockScope(), getCleanupKind(), and pushEHDestroy().
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 1202 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 | ) |
Pops a cleanup block. If the block includes a normal cleanup, the current insertion point is threaded through the cleanup, as are any branch fixups on the cleanup.
PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.
Definition at line 562 of file CGCleanup.cpp.
References Builder, CreateNormalEntry(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, destroyOptimisticNormalEntry(), EmitCleanup(), clang::CodeGen::CGDebugInfo::EmitLocation(), ForwardPrebranchedFallthrough(), clang::CodeGen::EHCleanupScope::getActiveFlag(), clang::CodeGen::EHCleanupScope::getBranchAfterBlock(), clang::CodeGen::EHCleanupScope::getBranchAfterIndex(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::EHCleanupScope::getCleanupBuffer(), clang::CodeGen::EHCleanupScope::getCleanupSize(), clang::CodeGen::EHScope::getEnclosingEHScope(), clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup(), clang::CodeGen::EHCleanupScope::getFixupDepth(), clang::CodeGen::EHCleanupScope::getNormalBlock(), clang::CodeGen::EHCleanupScope::getNumBranchAfters(), clang::CodeGen::EHCleanupScope::hasBranches(), clang::CodeGen::EHCleanupScope::hasBranchThroughs(), clang::CodeGen::EHScope::hasEHBranches(), clang::CodeGen::BranchFixup::InitialBranch, clang::CodeGen::EHCleanupScope::isActive(), clang::CodeGen::EHCleanupScope::isEHCleanup(), clang::CodeGen::EHCleanupScope::isNormalCleanup(), clang::CodeGen::BranchFixup::OptimisticBranchBlock, ResolveAllBranchFixups(), S, clang::CodeGen::EHScopeStack::Cleanup::Flags::setIsEHCleanupKind(), clang::CodeGen::EHScopeStack::Cleanup::Flags::setIsForEHCleanup(), clang::CodeGen::EHScopeStack::Cleanup::Flags::setIsNormalCleanupKind(), clang::CodeGen::EHCleanupScope::shouldTestFlagInEHCleanup(), clang::CodeGen::EHCleanupScope::shouldTestFlagInNormalCleanup(), and SimplifyCleanupEntry().
Referenced by EmitArrayDelete(), emitArrayDestroy(), EmitDestructorBody(), EmitObjCForCollectionStmt(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), and pushCleanupAfterFullExpr().
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 374 of file CGCleanup.cpp.
References clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup(), 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 393 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getKind(), and clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getSize().
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 1626 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 1414 of file CGExprCXX.cpp.
References EHStack, and clang::CodeGen::NormalAndEHCleanup.
void clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExpr | ( | CleanupKind | Kind, |
A0 | a0, | ||
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) | [inline] |
Queue a cleanup to be pushed after finishing the current full-expression.
Definition at line 437 of file CodeGenFunction.h.
References ActivateCleanupBlock(), DeactivateCleanupBlock(), initFullExprCleanup(), isInConditionalBranch(), LifetimeExtendedCleanupStack, PopCleanupBlock(), PushDestructorCleanup(), and clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::Size.
void CodeGenFunction::pushDestroy | ( | QualType::DestructionKind | dtorKind, |
llvm::Value * | addr, | ||
QualType | type | ||
) |
pushDestroy - Push the standard destructor for the given type as at least a normal cleanup.
Definition at line 1365 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getCleanupKind(), and getDestroyer().
Referenced by EmitAutoVarWithLifetime(), EmitParmDecl(), enterBlockScope(), pushEHDestroy(), and pushTemporaryCleanup().
void CodeGenFunction::pushDestroy | ( | CleanupKind | kind, |
llvm::Value * | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 1374 of file CGDecl.cpp.
References clang::ast_matchers::type.
void CodeGenFunction::PushDestructorCleanup | ( | QualType | T, |
llvm::Value * | 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 1937 of file CGClass.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::hasTrivialDestructor(), and clang::Decl::isUsed().
Referenced by pushCleanupAfterFullExpr().
void CodeGenFunction::PushDestructorCleanup | ( | const CXXDestructorDecl * | Dtor, |
llvm::Value * | 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 1932 of file CGClass.cpp.
References EHStack, and clang::CodeGen::NormalAndEHCleanup.
void CodeGenFunction::pushEHDestroy | ( | QualType::DestructionKind | dtorKind, |
llvm::Value * | addr, | ||
QualType | type | ||
) |
pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup.
Definition at line 1355 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getDestroyer(), needsEHCleanup(), and pushDestroy().
Referenced by EmitInitializerForField().
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup | ( | CleanupKind | kind, |
A0 | a0 | ||
) | [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 361 of file CodeGenFunction.h.
References EHStack, initFullExprCleanup(), isInConditionalBranch(), and saveValueInCond().
Referenced by EmitAnyExprToExn().
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup | ( | CleanupKind | kind, |
A0 | a0, | ||
A1 | a1 | ||
) | [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 378 of file CodeGenFunction.h.
References EHStack, initFullExprCleanup(), isInConditionalBranch(), and saveValueInCond().
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup | ( | CleanupKind | kind, |
A0 | a0, | ||
A1 | a1, | ||
A2 | a2 | ||
) | [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 396 of file CodeGenFunction.h.
References EHStack, initFullExprCleanup(), isInConditionalBranch(), and saveValueInCond().
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup | ( | CleanupKind | kind, |
A0 | a0, | ||
A1 | a1, | ||
A2 | a2, | ||
A3 | a3 | ||
) | [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 416 of file CodeGenFunction.h.
References EHStack, initFullExprCleanup(), isInConditionalBranch(), and saveValueInCond().
void CodeGenFunction::pushIrregularPartialArrayCleanup | ( | llvm::Value * | arrayBegin, |
llvm::Value * | arrayEndPointer, | ||
QualType | elementType, | ||
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.
elementType | - the immediate element type of the array; possibly still an array type |
Definition at line 1582 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by EmitNewArrayInitializer().
void CodeGenFunction::pushLifetimeExtendedDestroy | ( | CleanupKind | kind, |
llvm::Value * | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 1385 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, EHStack, isInConditionalBranch(), clang::CodeGen::NormalCleanup, and clang::ast_matchers::type.
Referenced by pushTemporaryCleanup().
void CodeGenFunction::pushRegularPartialArrayCleanup | ( | llvm::Value * | arrayBegin, |
llvm::Value * | arrayEnd, | ||
QualType | elementType, | ||
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.
elementType | - the immediate element type of the array; possibly still an array type |
Definition at line 1597 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by emitArrayDestroy(), EmitCXXAggrConstructorCall(), and EmitNewArrayInitializer().
void CodeGenFunction::pushStackRestore | ( | CleanupKind | kind, |
llvm::Value * | SPMem | ||
) |
Definition at line 1381 of file CGDecl.cpp.
References EHStack.
Referenced by clang::CodeGen::CallArgList::allocateArgumentMemory(), and EmitAutoVarAlloca().
void CodeGenFunction::registerGlobalDtorWithAtExit | ( | const VarDecl & | D, |
llvm::Constant * | fn, | ||
llvm::Constant * | addr | ||
) |
Register a global destructor using the C atexit runtime function.
Call atexit() with a function that passes the given argument to the given function.
Definition at line 196 of file CGDeclCXX.cpp.
References CGM, createAtExitStub(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), and clang::CodeGen::CodeGenTypeCache::IntTy.
void CodeGenFunction::ResolveBranchFixups | ( | llvm::BasicBlock * | Target | ) |
Definition at line 335 of file CGCleanup.cpp.
References Builder, clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, clang::CodeGen::BranchFixup::OptimisticBranchBlock, and TransitionToCleanupSwitch().
Referenced by EmitLabel().
Whether any type-checking sanitizers are enabled. If false
, calls to EmitTypeCheck can be skipped.
Definition at line 460 of file CGExpr.cpp.
References clang::SanitizerSet::has(), and SanOpts.
Referenced by EmitCastLValue(), EmitReferenceBindingToExpr(), EmitTypeCheck(), and GetAddressOfBaseClass().
DominatingValue<T>::saved_type clang::CodeGen::CodeGenFunction::saveValueInCond | ( | T | value | ) | [inline] |
Definition at line 325 of file CodeGenFunction.h.
Referenced by pushFullExprCleanup().
void clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional | ( | llvm::Value * | value, |
llvm::Value * | addr | ||
) | [inline] |
Definition at line 732 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::getStartingBlock(), and isInConditionalBranch().
Referenced by initFullExprCleanup(), and SetupCleanupBlockActivation().
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 3404 of file CGExpr.cpp.
References getLLVMContext(), and Node.
ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls
Definition at line 308 of file CodeGenFunction.cpp.
References CGM, CurFuncDecl, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::Decl::hasAttr().
Referenced by FinishFunction(), and StartFunction().
Definition at line 1081 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by EmitARCStoreStrong(), and emitAutoreleaseOfResult().
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 318 of file CGStmt.cpp.
References EHStack, and clang::CodeGen::EHScopeStack::empty().
Referenced by EmitDoStmt(), and EmitWhileStmt().
void clang::CodeGen::CodeGenFunction::StartBlock | ( | const char * | N | ) |
StartBlock - Start new block named N. If insert block is a dummy block then reuse it.
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.
Loc | The location to be associated with the function. |
StartLoc | The location of the function body. |
Definition at line 562 of file CodeGenFunction.cpp.
References AllocaInsertPt, AutoreleaseResult, Builder, CGM, clang::SanitizerSet::clear(), clang::frontend::CPlusPlus, createBasicBlock(), CreateIRTemp(), CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, EHStack, EmitFunctionInstrumentation(), EmitFunctionProlog(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitLoadOfLValue(), EmitLValueForLambdaField(), EmitMCountInstrumentation(), EmitStartEHSpec(), EmitVariablyModifiedType(), endsWithReturn(), FnRetTy, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CXXRecordDecl::getCaptureFields(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::ASTContext::getFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), getJumpDestInCurrentScope(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::Decl::getNonClosureContext(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::ValueDecl::getType(), clang::TargetCodeGenInfo::getUBSanFunctionSignature(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::CXXRecordDecl::isLambda(), clang::Type::isObjCRetainableType(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LambdaCaptureFields, LambdaThisCaptureField, PrologueCleanupDepth, clang::Redeclarable< decl_type >::redecls(), ReturnBlock, ReturnValue, SanOpts, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), StartObjCMethod(), and StartThunk().
void CodeGenFunction::StartObjCMethod | ( | const ObjCMethodDecl * | OMD, |
const ObjCContainerDecl * | CD, | ||
SourceLocation | StartLoc | ||
) |
StartObjCMethod - Begin emission of an ObjCMethod. This generates the LLVM function and sets the other context used by CodeGenFunction.
Definition at line 463 of file CGObjC.cpp.
References clang::CodeGen::CodeGenTypes::arrangeObjCMethodDeclaration(), CGM, CurGD, EHStack, clang::CodeGen::CGObjCRuntime::GenerateMethod(), getARCCleanupKind(), clang::ObjCMethodDecl::getCmdDecl(), clang::Selector::getIdentifierInfoForSlot(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isInstanceMethod(), clang::IdentifierInfo::isStr(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::params(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().
Referenced by GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), and GenerateObjCSetter().
void CodeGenFunction::StartThunk | ( | llvm::Function * | Fn, |
GlobalDecl | GD, | ||
const CGFunctionInfo & | FnInfo | ||
) |
Definition at line 193 of file CGVTables.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CGCXXABI::buildThisParam(), CGM, CurFuncIsThunk, CurGD, clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::Decl::getLocation(), clang::FunctionType::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), StartFunction(), and clang::ASTContext::VoidPtrTy.
Referenced by GenerateThunk().
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 967 of file CGExpr.cpp.
References AttributeLangSupport::C, CEK_AsReferenceOnly, CEK_AsValueOnly, CEK_None, CGM, checkVarTypeForConstantEmission(), clang::CodeGen::CodeGenModule::EmitConstantValue(), EmitDeclRefExprDbgValue(), clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::CodeGen::CodeGenFunction::ConstantEmission::forReference(), clang::CodeGen::CodeGenFunction::ConstantEmission::forValue(), getContext(), clang::DeclRefExpr::getDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::EvalStatus::HasSideEffects, and clang::Expr::EvalResult::Val.
TypeOfSelfObject - Return type of object that this self represents.
Definition at line 1413 of file CGObjC.cpp.
References CurFuncDecl, clang::ASTContext::getCanonicalType(), getContext(), clang::ObjCObjectPointerType::getPointeeType(), and clang::ObjCMethodDecl::getSelfDecl().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructGetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
void CodeGenFunction::unprotectFromPeepholes | ( | PeepholeProtection | protection | ) |
Definition at line 1645 of file CodeGenFunction.cpp.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::unbind().
Definition at line 3851 of file CGBuiltin.cpp.
References Builder.
Definition at line 3860 of file CGBuiltin.cpp.
References Builder.
friend class CGCXXABI [friend] |
Definition at line 115 of file CodeGenFunction.h.
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 180 of file CodeGenFunction.h.
Referenced by CreateTempAlloca(), clang::CodeGen::EmitOpenMPUpdateLocation(), FinishFunction(), clang::CodeGen::GetOpenMPThreadID(), InitTempAlloca(), and StartFunction().
In ARC, whether we should autorelease the return value.
Definition at line 270 of file CodeGenFunction.h.
Referenced by EmitCallAndReturnForThunk(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().
Definition at line 276 of file CodeGenFunction.h.
Referenced by EmitLambdaBlockInvokeBody(), and EmitParmDecl().
Definition at line 277 of file CodeGenFunction.h.
Referenced by LoadBlockStruct().
BoundsChecking - Emit run-time bounds checks. Higher values mean potentially higher performance penalties.
Definition at line 249 of file CodeGenFunction.h.
Definition at line 147 of file CodeGenFunction.h.
Referenced by AddDirectArgument(), AddInitializerToStaticVarDecl(), AdjustRelatedResultType(), clang::CodeGen::CallArgList::allocateArgumentMemory(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), CheckAggExprForMemSetUse(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createPlaceholderSlot(), CreateTempAlloca(), EmitAArch64TblBuiltinExpr(), EmitAggMemberInitializer(), EmitAggregateCopy(), EmitAlignmentAssumption(), EmitAnnotationCall(), EmitAnyExprToExn(), emitARCCopyOperation(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCInitWeak(), emitARCLoadOperation(), EmitARCRelease(), emitARCRetainAfterCall(), EmitARCRetainAutorelease(), EmitARCRetainAutoreleasedReturnValue(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), EmitArrayDelete(), emitArrayDestroy(), emitArrayLength(), EmitArraySubscriptExpr(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicLoad(), EmitAtomicOp(), EmitAtomicStore(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitBitCastOfLValueToProperType(), EmitBlock(), EmitBlockAfterUses(), EmitBlockWithFallThrough(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitBoundsCheck(), EmitBranch(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallExpr(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastLValue(), EmitCastToVoidPtr(), emitCatchDispatchBlock(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), EmitCleanup(), EmitCommonNeonSISDBuiltinExpr(), EmitComplexPrePostIncDec(), EmitCondBrHints(), EmitConditionalOperatorLValue(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCtorPrologue(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXTypeidExpr(), EmitCXXUuidofExpr(), EmitDeclInvariant(), EmitDeclRefLValue(), EmitDeleteCall(), emitDestroy(), EmitDestructorBody(), EmitDoStmt(), EmitDynamicCast(), EmitExtendGCLifetime(), EmitExtVectorElementExpr(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), EmitForStmt(), emitFPIntBuiltin(), EmitFromInt(), EmitFromMemory(), EmitFunctionBody(), EmitFunctionDeclLValue(), EmitFunctionInstrumentation(), EmitGlobalVarDeclLValue(), EmitIfStmt(), EmitIndirectGotoStmt(), EmitInitializerForField(), EmitLabel(), EmitLandingPad(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonNullArgCheck(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolStmt(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCMessageExpr(), EmitObjectDelete(), EmitOMPAggregateAssign(), EmitOMPIfClause(), EmitOMPInnerLoop(), clang::CodeGen::EmitOMPNumThreadsClause(), clang::CodeGen::EmitOMPParallelCall(), clang::CodeGen::EmitOMPSerialCall(), EmitOMPSimdDirective(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), clang::CodeGen::EmitOMPThreadPrivateVarInit(), clang::CodeGen::EmitOpenMPUpdateLocation(), EmitOverflowIntrinsic(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitReturnBlock(), EmitReturnStmt(), EmitScalarInit(), EmitSizedDeallocationFunction(), EmitStmt(), EmitStopPoint(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), emitTernaryFPBuiltin(), clang::CodeGen::CGCXXABI::EmitThisParam(), EmitToInt(), EmitToMemory(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), emitUnaryFPBuiltin(), EmitUnaryOpLValue(), EmitVAArgFromMemory(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVariablyModifiedType(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), findDominatingStoreToReturnValue(), FinishFunction(), clang::CodeGen::CallArgList::freeArgumentMemory(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), GenerateObjCMethod(), generateObjCSetterBody(), GenerateVarArgsThunk(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getArrayIndexingBound(), getEHResumeBlock(), getExceptionFromSlot(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::CodeGen::getOMPAddrOfThreadPrivate(), clang::CodeGen::GetOpenMPThreadID(), getSelectorFromSlot(), getTerminateHandler(), getTerminateLandingPad(), getVLASize(), GetVTablePtr(), GetVTTParameter(), HaveInsertPoint(), InitCatchParam(), initFullExprCleanup(), InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), packTBLDVectorList(), performBaseAdjustment(), PerformReturnAdjustment(), performTypeAdjustment(), PPC64_initDwarfEHRegSizeTable(), protectFromPeepholes(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), ResolveAllBranchFixups(), clang::CodeGen::DominatingLLVMValue::restore(), clang::CodeGen::DominatingLLVMValue::save(), SetupCleanupBlockActivation(), SimplifyCleanupEntry(), StartFunction(), tryEmitARCRetainScalarExpr(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
Definition at line 245 of file CodeGenFunction.h.
Referenced by EmitCapturedStmt(), EmitDeclRefLValue(), EmitOMPFirstprivateClause(), clang::CodeGen::EmitThreadIDAddress(), GenerateCapturedStmtFunction(), and clang::CodeGen::GetOpenMPThreadID().
Definition at line 142 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), clang::CodeGen::CallArgList::allocateArgumentMemory(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), buildFMulAdd(), CalculateCookiePadding(), CallBeginCatch(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), ConvertType(), ConvertTypeForMem(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createReferenceTemporary(), EmitAArch64TblBuiltinExpr(), EmitAggregateCopy(), EmitAlignmentAssumption(), EmitAnnotationCall(), emitARCCopyOperation(), emitARCLoadOperation(), emitARCStoreOperation(), emitARCValueOperation(), EmitArrayDelete(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAtomicExpr(), emitAtomicLibcall(), EmitAtomicLoad(), EmitAtomicStore(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBlockWithFallThrough(), EmitCall(), EmitCallAndReturnForThunk(), EmitCapturedStmt(), EmitCaseStmt(), emitCatchDispatchBlock(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCompoundLiteralLValue(), EmitCondBrHints(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCtorPrologue(), EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXOperatorMemberCallee(), EmitCXXStructorCall(), EmitCXXTypeidExpr(), EmitCXXUuidofExpr(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefExprDbgValue(), EmitDeclRefLValue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDynamicCast(), EmitDynamicCastToNull(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), EmitForwardingCallToLambda(), emitFPIntBuiltin(), EmitFunctionDeclLValue(), EmitFunctionInstrumentation(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), EmitGlobalVarDeclLValue(), EmitIvarOffset(), EmitLambdaStaticInvokeFunction(), EmitLambdaToBlockPointerBody(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForIvar(), EmitMaterializeTemporaryExpr(), EmitMCountInstrumentation(), EmitMemberInitializer(), EmitMustTailThunk(), EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCEncodeExprLValue(), EmitObjCMessageExpr(), EmitObjCProtocolExpr(), EmitObjCSelectorExpr(), EmitObjCSelectorLValue(), EmitObjCStringLiteral(), EmitObjectDelete(), EmitOMPCriticalDirective(), clang::CodeGen::EmitOMPNumThreadsClause(), EmitOMPParallelCall(), EmitOMPParallelDirective(), EmitOMPSimdDirective(), EmitOverflowIntrinsic(), EmitParmDecl(), emitPointerArithmetic(), EmitPointerToDataMemberBinaryExpr(), EmitPredefinedLValue(), emitRTtypeidCall(), EmitSizedDeallocationFunction(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), EmitStringLiteralLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSynthesizedCXXCopyCtorCall(), emitTernaryFPBuiltin(), EmitThreadPrivateVarDeclLValue(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), emitUnaryFPBuiltin(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVarDecl(), emitWritebackArg(), enterBlockScope(), EnterStructPointerForCoercedAccess(), ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), FinishFunction(), clang::CodeGen::CallArgList::freeArgumentMemory(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), generateDestroyHelper(), GenerateThunk(), GenerateVarArgsThunk(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getARCCleanupKind(), getAsmSrcLocInfo(), getBadCastFn(), getBadTypeidFn(), getContext(), getItaniumDynamicCastFn(), getLangOpts(), getLLVMContext(), getPolymorphicOffset(), getTypes(), GetVTablePtr(), GetVTTParameter(), InitCatchParam(), InitializeVTablePointer(), InitializeVTablePointers(), InsertHelper(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), needsEHCleanup(), packTBLDVectorList(), PerformReturnAdjustment(), pushTemporaryCleanup(), registerGlobalDtorWithAtExit(), ShouldInstrumentFunction(), shouldUseFusedARCCalls(), shouldUseLifetimeMarkers(), StartFunction(), StartObjCMethod(), StartThunk(), tryEmitAsConstant(), tryEmitFMulAdd(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), and ~CodeGenFunction().
CurCodeDecl - This is the inner-most code context, which includes blocks.
Definition at line 159 of file CodeGenFunction.h.
Referenced by EmitDeclRefLValue(), EmitLambdaToBlockPointerBody(), EmitLValueForLambdaField(), EmitObjCMessageExpr(), EmitParmDecl(), EmitPredefinedLValue(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), ExitCXXTryStmt(), FinishFunction(), GetVTTParameter(), LoadObjCSelf(), StartFunction(), and tryRemoveRetainOfSelf().
llvm::Function* clang::CodeGen::CodeGenFunction::CurFn |
Definition at line 162 of file CodeGenFunction.h.
Referenced by emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), EmitBlock(), EmitBlockAfterUses(), EmitCaseStmtRange(), EmitDestructorBody(), EmitFunctionInstrumentation(), EmitIfUsed(), EmitMustTailThunk(), clang::CodeGen::EmitOpenMPUpdateLocation(), EmitPredefinedLValue(), EmitSizedDeallocationFunction(), enterBlockScope(), clang::CodeGen::FunctionFinished(), GenerateCode(), GenerateObjCMethod(), GenerateVarArgsThunk(), GetAddrOfLabel(), clang::CodeGen::GetOpenMPThreadID(), and StartFunction().
Definition at line 160 of file CodeGenFunction.h.
Referenced by EmitAsmStmt(), EmitCallAndReturnForThunk(), EmitMustTailThunk(), FinishFunction(), and StartFunction().
CurFuncDecl - Holds the Decl for the current outermost non-closure context.
Definition at line 157 of file CodeGenFunction.h.
Referenced by computeBlockInfo(), EmitObjCMessageExpr(), clang::CodeGen::EmitOpenMPUpdateLocation(), LoadObjCSelf(), ShouldInstrumentFunction(), StartFunction(), and TypeOfSelfObject().
In C++, whether we are code generating a thunk. This controls whether we should emit cleanups.
Definition at line 267 of file CodeGenFunction.h.
Referenced by EmitParmDecl(), and StartThunk().
CurGD - The GlobalDecl for the current function being compiled.
Definition at line 165 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGCXXABI::buildThisParam(), EmitAsanPrologueOrEpilogue(), EmitCallAndReturnForThunk(), EmitConstructorBody(), EmitCXXConstructExpr(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), emitImplicitAssignmentOperatorBody(), EmitLambdaToBlockPointerBody(), GenerateCode(), GetVTTParameter(), StartObjCMethod(), and StartThunk().
void CodeGenFunction::destroyARCStrongImprecise [static] |
Definition at line 2458 of file CodeGenFunction.h.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), enterBlockScope(), and pushTemporaryCleanup().
void CodeGenFunction::destroyARCStrongPrecise [static] |
Definition at line 2459 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().
void CodeGenFunction::destroyARCWeak [static] |
Definition at line 2460 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().
void CodeGenFunction::destroyCXXObject [static] |
Definition at line 1733 of file CodeGenFunction.h.
Referenced by EmitCXXAggrConstructorCall(), getDestroyer(), and pushTemporaryCleanup().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock |
EHResumeBlock - Unified block containing a call to llvm.eh.resume.
Definition at line 309 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 317 of file CodeGenFunction.h.
Referenced by getEHSelectorSlot().
Definition at line 286 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CallArgList::allocateArgumentMemory(), CallBeginCatch(), EmitAnyExprToExn(), EmitArrayDelete(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), EmitCleanup(), emitCXXDestructMethod(), EmitDelegatingCXXConstructorCall(), EmitEndEHSpec(), EmitLabel(), EmitLandingPad(), EmitNewArrayInitializer(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolStmt(), EmitObjectDelete(), EmitParmDecl(), EmitStartEHSpec(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), EnterCXXTryStmt(), EnterDtorCleanups(), EnterNewDeleteCleanup(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), FinishFunction(), getEHDispatchBlock(), getInvokeDest(), getInvokeDestImpl(), getJumpDestInCurrentScope(), InitCatchParam(), initFullExprCleanup(), popCatchScope(), pushCallObjectDeleteCleanup(), PushDestructorCleanup(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), pushStackRestore(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), clang::CodeGen::CodeGenFunction::LexicalScope::rescopeLabels(), ResolveAllBranchFixups(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), and StartObjCMethod().
The exception slot. All landing pads write the current exception pointer into this alloca.
Definition at line 313 of file CodeGenFunction.h.
Referenced by getExceptionSlot().
FirstBlockInfo - The head of a singly-linked-list of block layouts.
Definition at line 306 of file CodeGenFunction.h.
Referenced by enterBlockScope(), and ~CodeGenFunction().
Definition at line 161 of file CodeGenFunction.h.
Referenced by EmitAsmStmt(), EmitReturnStmt(), and StartFunction().
True if CodeGen currently emits code implementing sanitizer checks.
Definition at line 255 of file CodeGenFunction.h.
Referenced by EmitCheck(), InsertHelper(), and clang::CodeGen::CodeGenFunction::SanitizerScope::SanitizerScope().
llvm::DenseMap<const VarDecl *, FieldDecl *> clang::CodeGen::CodeGenFunction::LambdaCaptureFields |
Definition at line 279 of file CodeGenFunction.h.
Referenced by EmitDeclRefLValue(), and StartFunction().
Definition at line 280 of file CodeGenFunction.h.
Referenced by StartFunction().
llvm::SmallVector<char, 256> clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupStack |
Definition at line 287 of file CodeGenFunction.h.
Referenced by pushCleanupAfterFullExpr(), and ~CodeGenFunction().
Definition at line 146 of file CodeGenFunction.h.
Referenced by EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitOMPInnerLoop(), EmitOMPSimdDirective(), EmitWhileStmt(), and InsertHelper().
Definition at line 303 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 301 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 284 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 332 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt().
PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.
Definition at line 169 of file CodeGenFunction.h.
Referenced by FinishFunction(), and StartFunction().
ReturnBlock - Unified return block.
Definition at line 172 of file CodeGenFunction.h.
Referenced by EmitForwardingCallToLambda(), EmitReturnBlock(), EmitReturnStmt(), FinishFunction(), and StartFunction().
ReturnValue - The temporary alloca to hold the return value. This is null iff the function has no return value.
Definition at line 176 of file CodeGenFunction.h.
Referenced by EmitAsmStmt(), EmitAutoVarAlloca(), EmitCallAndReturnForThunk(), EmitCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXStructorCall(), EmitForwardingCallToLambda(), clang::CodeGen::EmitOMPThreadPrivateVarDefinition(), EmitReturnStmt(), emitStructGetterCall(), findDominatingStoreToReturnValue(), generateObjCGetterBody(), and StartFunction().
Sanitizers enabled for this function.
Definition at line 252 of file CodeGenFunction.h.
Referenced by EmitArraySubscriptExpr(), EmitBoundsCheck(), EmitCall(), EmitCheck(), EmitCheckedLValue(), EmitLoadOfScalar(), emitNonNullArgCheck(), emitPointerArithmetic(), EmitTypeCheck(), EmitVariablyModifiedType(), GenerateCode(), sanitizePerformTypeCheck(), and StartFunction().
Whether we processed a Microsoft-style asm block during CodeGen. These can potentially set the return value.
Definition at line 274 of file CodeGenFunction.h.
Referenced by EmitAsmStmt(), and GenerateCode().
Definition at line 143 of file CodeGenFunction.h.
Referenced by EmitIndirectGotoStmt(), and getTarget().