clang API Documentation
#include <CodeGenFunction.h>


CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code.
Definition at line 535 of file CodeGenFunction.h.
| typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy |
Definition at line 564 of file CodeGenFunction.h.
| typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, llvm::Value *addr, QualType ty) |
Definition at line 1251 of file CodeGenFunction.h.
| typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address) |
Definition at line 1849 of file CodeGenFunction.h.
| typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> clang::CodeGen::CodeGenFunction::VisitedVirtualBasesSetTy |
Definition at line 1420 of file CodeGenFunction.h.
| CodeGenFunction::CodeGenFunction | ( | CodeGenModule & | cgm | ) |
Definition at line 31 of file CodeGenFunction.cpp.
References CatchUndefined, CGM, getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ASTContext::getLangOpts(), clang::CodeGen::CGCXXABI::getMangleContext(), and clang::MangleContext::startNewFunction().
| CodeGenFunction::~CodeGenFunction | ( | ) |
Definition at line 48 of file CodeGenFunction.cpp.
References destroyBlockInfos(), and FirstBlockInfo.
| 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 1056 of file CGCleanup.cpp.
References ForActivation, and SetupCleanupBlockActivation().
| 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 212 of file CGDecl.cpp.
References Builder, CGM, clang::frontend::CPlusPlus, clang::CodeGen::CodeGenModule::EmitConstantInit(), EmitCXXGuardedInit(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), hasNontrivialDestruction(), clang::VarDecl::isThreadSpecified(), 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 | ||
| ) |
BuildVirtualCall - 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 316 of file CGCXX.cpp.
References BuildAppleKextVirtualDestructorCall(), Builder, CGM, clang::Dtor_Complete, clang::VTableLayout::getAddressPoint(), clang::CodeGen::CodeGenVTables::GetAddrOfVTable(), clang::NestedNameSpecifier::getAsType(), clang::CXXMethodDecl::getCanonicalDecl(), clang::RecordType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::VTableContext::getMethodVTableIndex(), clang::CodeGen::CodeGenModule::getVTableContext(), clang::VTableContext::getVTableLayout(), clang::CodeGen::CodeGenModule::getVTables(), clang::NestedNameSpecifier::TypeSpec, and clang::CharUnits::Zero().
Referenced by 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 350 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXDestructor(), Builder, CGM, clang::Dtor_Base, clang::Dtor_Complete, clang::VTableLayout::getAddressPoint(), clang::CodeGen::CodeGenVTables::GetAddrOfVTable(), clang::CXXMethodDecl::getCanonicalDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::VTableContext::getMethodVTableIndex(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenModule::getVTableContext(), clang::VTableContext::getVTableLayout(), clang::CodeGen::CodeGenModule::getVTables(), clang::CXXMethodDecl::isVirtual(), and clang::CharUnits::Zero().
Referenced by BuildAppleKextVirtualCall(), and EmitCXXDestructorCall().
| 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 1813 of file CGBlocks.cpp.
References clang::NamedDecl::getNameAsString().
Referenced by drillIntoBlockVariable(), and EmitDeclRefLValue().
| void CodeGenFunction::BuildBlockRelease | ( | llvm::Value * | DeclPtr, |
| BlockFieldFlags | flags | ||
| ) |
Definition at line 1965 of file CGBlocks.cpp.
References clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
| 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 char padding[X]; // only if needed T x; } x
void *__copy_helper;
void *__destroy_helper;
Definition at line 1836 of file CGBlocks.cpp.
References clang::serialized_diags::create(), clang::ASTContext::getBlockVarCopyInits(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::NamedDecl::getNameAsString(), clang::CharUnits::getQuantity(), 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 2223 of file CGBuiltin.cpp.
| llvm::Value * CodeGenFunction::BuildVirtualCall | ( | const CXXMethodDecl * | MD, |
| llvm::Value * | This, | ||
| llvm::Type * | Ty | ||
| ) |
Definition at line 304 of file CGCXX.cpp.
References CGM, clang::CXXMethodDecl::getCanonicalDecl(), clang::VTableContext::getMethodVTableIndex(), and clang::CodeGen::CodeGenModule::getVTableContext().
Referenced by BuildVirtualCall(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallee(), and EmitObjectDelete().
| llvm::Value * CodeGenFunction::BuildVirtualCall | ( | const CXXDestructorDecl * | DD, |
| CXXDtorType | Type, | ||
| llvm::Value * | This, | ||
| llvm::Type * | Ty | ||
| ) |
Definition at line 384 of file CGCXX.cpp.
References BuildVirtualCall(), CGM, clang::CXXMethodDecl::getCanonicalDecl(), clang::VTableContext::getMethodVTableIndex(), and clang::CodeGen::CodeGenModule::getVTableContext().
| 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 538 of file CodeGenFunction.cpp.
Referenced by EmitBranchOnBoolExpr(), EmitConditionalOperatorLValue(), EmitIfStmt(), and EmitSwitchStmt().
| bool CodeGenFunction::ConstantFoldsToSimpleInteger | ( | const Expr * | Cond, |
| llvm::APInt & | 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 552 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 513 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 481 of file CodeGenFunction.cpp.
References clang::Stmt::children().
Referenced by CollectStatementsForCase(), ConstantFoldsToSimpleInteger(), EmitAutoVarInit(), EmitConditionalOperatorLValue(), EmitIfStmt(), EmitStmt(), and FindCaseStatementsForValue().
| llvm::Type * CodeGenFunction::ConvertType | ( | QualType | T | ) |
Definition at line 61 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by AdjustRelatedResultType(), ApplyNonVirtualAndVirtualOffset(), ConvertType(), CreateIRTemp(), EmitAggMemberInitializer(), EmitAggregateCopy(), emitArgumentDemotion(), emitArrayLength(), EmitAsmStmt(), EmitCall(), EmitCastLValue(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitDeleteCall(), EmitDynamicCastCall(), EmitDynamicCastToNull(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitInitializerForField(), EmitLambdaDelegatingInvokeBody(), EmitLoadOfBitfieldLValue(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCStringLiteral(), EmitStdInitializerListCleanup(), EmitStoreThroughLValue(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitUnsupportedLValue(), emitWritebackArg(), generateObjCGetterBody(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getDynamicCastFn(), GetUndefRValue(), GetVirtualBaseClassOffset(), PerformTypeAdjustment(), and tryEmitARCRetainScalarExpr().
| llvm::Type* clang::CodeGen::CodeGenFunction::ConvertType | ( | const TypeDecl * | T | ) | [inline] |
Definition at line 1480 of file CodeGenFunction.h.
References ConvertType(), and getContext().
| llvm::Type * CodeGenFunction::ConvertTypeForMem | ( | QualType | T | ) |
Definition at line 57 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by CreateMemTemp(), CreateReferenceTemporary(), EmitAnyExprToExn(), EmitAsmStmt(), EmitAutoVarAlloca(), EmitCXXDeleteExpr(), EmitCXXNewExpr(), EmitLValueForFieldInitialization(), EmitParmDecl(), EmitStoreThroughBitfieldLValue(), EmitVAArgFromMemory(), 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 1598 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 EmitAnyExprToTemp(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), and EmitLambdaLValue().
| llvm::BasicBlock* clang::CodeGen::CodeGenFunction::createBasicBlock | ( | StringRef | name = "", |
| llvm::Function * | parent = 0, |
||
| llvm::BasicBlock * | before = 0 |
||
| ) | [inline] |
createBasicBlock - Create an LLVM basic block.
Definition at line 1496 of file CodeGenFunction.h.
References getLLVMContext().
Referenced by CreateNormalEntry(), EmitAggMemberInitializer(), emitArrayDestroy(), EmitAtomicExpr(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallOrInvoke(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastCall(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLandingPad(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeidFromVTable(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterCXXTryStmt(), ExitCXXTryStmt(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getEHDispatchBlock(), getEHResumeBlock(), GetIndirectGotoBlock(), getJumpDestForLabel(), getJumpDestInCurrentScope(), getTerminateHandler(), getTerminateLandingPad(), getTrapBB(), getUnreachableBlock(), PerformReturnAdjustment(), and StartFunction().
| 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 64 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 73 of file CGExpr.cpp.
References ConvertTypeForMem(), CreateTempAlloca(), getContext(), clang::CharUnits::getQuantity(), and clang::ASTContext::getTypeAlignInChars().
Referenced by CreateAggTemp(), CreateReferenceTemporary(), EmitAggExprToLValue(), EmitAtomicExpr(), EmitCall(), EmitCastLValue(), EmitCompoundLiteralLValue(), EmitExtVectorElementExpr(), EmitFunctionProlog(), EmitNullInitializationLValue(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitValToTemp(), and GetUndefRValue().
| llvm::GlobalVariable * CodeGenFunction::CreateStaticVarDecl | ( | const VarDecl & | D, |
| const char * | Separator, | ||
| llvm::GlobalValue::LinkageTypes | Linkage | ||
| ) |
CreateStaticVarDecl - Create a zero-initialized LLVM global for a static local variable.
Definition at line 173 of file CGDecl.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), CurFn, clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getMangledName(), clang::CodeGen::CodeGenModule::getModule(), GetStaticDeclName(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::InternalLinkage, clang::QualType::isConstant(), and clang::VarDecl::isThreadSpecified().
Referenced by EmitAutoVarAlloca(), and EmitStaticVarDecl().
| 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 50 of file CGExpr.cpp.
References AllocaInsertPt, and Builder.
Referenced by CreateCoercedLoad(), CreateCoercedStore(), CreateIRTemp(), CreateMemTemp(), EmitAutoVarAlloca(), EmitFunctionProlog(), EmitInitializerForField(), EmitNewArrayInitializer(), 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 1068 of file CGCleanup.cpp.
References ForDeactivation, and SetupCleanupBlockActivation().
Referenced by EmitAnyExprToExn(), EmitCXXNewExpr(), and EmitNewArrayInitializer().
| void CodeGenFunction::destroyBlockInfos | ( | CGBlockInfo * | info | ) | [static] |
Destroy a chain of block layouts.
Definition at line 600 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::NextBlockInfo.
Referenced by ~CodeGenFunction().
| void clang::CodeGen::CodeGenFunction::disableDebugInfo | ( | ) | [inline] |
Definition at line 1211 of file CodeGenFunction.h.
Referenced by EmitScalarExpr().
| void CodeGenFunction::EmitAggExpr | ( | const Expr * | E, |
| AggValueSlot | Slot, | ||
| bool | IgnoreResult = false |
||
| ) |
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.
| IsInitializer | - true if this evaluation is initializing an object whose lifetime is already being managed. |
Definition at line 1170 of file CGExprAgg.cpp.
References CheckAggExprForMemSetUse(), clang::CodeGen::AggValueSlot::getAddr(), clang::Expr::getType(), hasAggregateLLVMType(), and clang::CodeGen::AggValueSlot::isIgnored().
Referenced by EmitAggExprToLValue(), EmitAggMemberInitializer(), EmitAnyExpr(), EmitAnyExprToMem(), EmitAtomicExpr(), EmitBaseInitializer(), EmitCXXBindTemporaryLValue(), EmitCXXConstructExpr(), EmitDeclInit(), EmitDelegatingCXXConstructorCall(), EmitExprAsInit(), emitPseudoObjectExpr(), EmitReturnStmt(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
Definition at line 1183 of file CGExprAgg.cpp.
References CreateMemTemp(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), clang::CodeGen::AggValueSlot::forLValue(), clang::Expr::getType(), hasAggregateLLVMType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue(), EmitCastLValue(), EmitConditionalOperatorLValue(), EmitInitListLValue(), and EmitVAArgExprLValue().
| void CodeGenFunction::EmitAggregateCopy | ( | llvm::Value * | DestPtr, |
| llvm::Value * | SrcPtr, | ||
| QualType | EltTy, | ||
| bool | isVolatile = false, |
||
| unsigned | Alignment = 0 |
||
| ) |
EmitAggregateCopy - Emit an aggrate copy.
| isVolatile | - True iff either the source or the destination is volatile. |
Definition at line 1193 of file CGExprAgg.cpp.
References Builder, CGM, ConvertType(), clang::CodeGen::CGObjCRuntime::EmitGCMemmoveCollectable(), clang::ASTContext::getBaseElementType(), getContext(), clang::RecordType::getDecl(), clang::ASTContext::getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeInfoInChars(), clang::RecordDecl::hasObjectMember(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CXXRecordDecl::isEmpty(), and clang::LangOptions::NonGC.
Referenced by EmitCall(), EmitCXXConstructorCall(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitMemberInitializer(), EmitSynthesizedCXXCopyCtorCall(), generateObjCGetterBody(), and InitCatchParam().
| llvm::Value * CodeGenFunction::EmitAnnotationCall | ( | llvm::Value * | AnnotationFn, |
| llvm::Value * | AnnotatedVal, | ||
| llvm::StringRef | AnnotationStr, | ||
| SourceLocation | Location | ||
| ) |
Emit an annotation call (intrinsic or builtin).
Definition at line 1121 of file CodeGenFunction.cpp.
References Args, 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 111 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::asRValue(), EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), clang::Expr::getType(), and hasAggregateLLVMType().
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitAnyExprToTemp(), EmitBinaryOperatorLValue(), EmitCompoundStmt(), EmitExprForReferenceBinding(), EmitIgnoredExpr(), EmitObjCBoxedExpr(), 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 135 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitComplexExprIntoAddr(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::RValue::get(), getContext(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), hasAggregateLLVMType(), clang::Qualifiers::hasVolatile(), and MakeAddrLValue().
Referenced by EmitAnyExprToExn(), EmitCastLValue(), EmitCompoundLiteralLValue(), and EmitValToTemp().
EmitAnyExprToTemp - Similary to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.
Definition at line 124 of file CGExpr.cpp.
References CreateAggTemp(), EmitAnyExpr(), clang::Expr::getType(), hasAggregateLLVMType(), and clang::CodeGen::AggValueSlot::ignored().
Referenced by EmitCallArg(), and EmitStmtExprLValue().
| llvm::Value * CodeGenFunction::EmitARCAutorelease | ( | llvm::Value * | value | ) |
Autorelease the given object. call i8* (i8* value)
Definition at line 1998 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_autorelease.
Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().
| llvm::Value * CodeGenFunction::EmitARCAutoreleaseReturnValue | ( | llvm::Value * | value | ) |
Autorelease the given object. call i8* (i8* value)
Definition at line 2007 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 (i8** dest, i8** src) Disregards the current value in dest. Essentially objc_release(objc_initWeak(dest, objc_readWeakRetained(src)))
Definition at line 2125 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_copyWeak.
| void CodeGenFunction::EmitARCDestroyWeak | ( | llvm::Value * | addr | ) |
void (i8** addr) Essentially objc_storeWeak(addr, nil).
Definition at line 2097 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), 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 2623 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitObjCConsumeObject(), EmitScalarExpr(), clang::Expr::getType(), shouldEmitSeparateBlockRetain(), and tryEmitARCRetainScalarExpr().
| void CodeGenFunction::EmitARCInitWeak | ( | llvm::Value * | addr, |
| llvm::Value * | value | ||
| ) |
i8* (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 2079 of file CGObjC.cpp.
References Builder, emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::ARCEntrypoints::objc_initWeak, and clang::CodeGenOptions::OptimizationLevel.
Referenced by EmitParmDecl(), EmitScalarInit(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and InitCatchParam().
| llvm::Value * CodeGenFunction::EmitARCLoadWeak | ( | llvm::Value * | addr | ) |
i8* (i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).
Definition at line 2052 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_loadWeak.
Referenced by EmitLoadOfLValue().
| llvm::Value * CodeGenFunction::EmitARCLoadWeakRetained | ( | llvm::Value * | addr | ) |
i8* (i8** addr)
Definition at line 2059 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_loadWeakRetained.
Referenced by tryEmitARCRetainLoadOfScalar().
| void CodeGenFunction::EmitARCMoveWeak | ( | llvm::Value * | dst, |
| llvm::Value * | src | ||
| ) |
void (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 2116 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_moveWeak.
| void CodeGenFunction::EmitARCRelease | ( | llvm::Value * | value, |
| bool | precise | ||
| ) |
Release the given object. call void (i8* value)
Definition at line 1910 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ARCEntrypoints::objc_release.
Referenced by EmitARCStoreStrong(), EmitCallExpr(), EmitObjectDelete(), and EmitScalarInit().
| 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* (i8* value) call i8* (i8* value)
Definition at line 1813 of file CGObjC.cpp.
References EmitARCRetainBlock(), and EmitARCRetainNonBlock().
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* (i8* value) or retain = call i8* (i8* value) call i8* (i8* retain)
Definition at line 2027 of file CGObjC.cpp.
References Builder, EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitObjCExtendObjectLifetime(), EmitObjCMessageExpr(), and EmitScalarInit().
| llvm::Value * CodeGenFunction::EmitARCRetainAutoreleasedReturnValue | ( | llvm::Value * | value | ) |
Retain the given object which is the result of a function call. call i8* (i8* value)
Yes, this function name is one character away from a different call with completely different semantics.
Definition at line 1864 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::CodeGenOptions::OptimizationLevel, clang::CodeGen::ARCEntrypoints::retainAutoreleasedReturnValueMarker, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitARCRetainAfterCall().
| llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseNonBlock | ( | llvm::Value * | value | ) |
Do a fused retain/autorelease of the given object. call i8* (i8* value)
Definition at line 2044 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_retainAutorelease.
Referenced by EmitARCRetainAutorelease().
| llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseReturnValue | ( | llvm::Value * | value | ) |
Do a fused retain/autorelease of the given object. call i8* (i8* value)
Definition at line 2016 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 2613 of file CGObjC.cpp.
References EmitARCAutorelease(), EmitARCRetainAutorelease(), 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* (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 1834 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* (i8* value)
Definition at line 1822 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(), 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 2604 of file CGObjC.cpp.
References EmitARCRetain(), 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 2700 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 (i8** addr, i8* value) Other times, breaks it down into components.
Definition at line 1963 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::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, and shouldUseFusedARCCalls().
Referenced by EmitARCStoreStrong(), EmitBinaryOperatorLValue(), and EmitStoreThroughLValue().
| std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreStrong | ( | const BinaryOperator * | e, |
| bool | ignored | ||
| ) |
Definition at line 2668 of file CGObjC.cpp.
References EmitARCRelease(), EmitARCRetainBlock(), EmitARCStoreStrong(), EmitLoadOfScalar(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().
| llvm::Value * CodeGenFunction::EmitARCStoreStrongCall | ( | llvm::Value * | addr, |
| llvm::Value * | value, | ||
| bool | ignored | ||
| ) |
Store into a strong object. Always calls this: call void (i8** addr, i8* value)
Definition at line 1937 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), getElementType(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ARCEntrypoints::objc_storeStrong.
Referenced by destroyARCStrongWithStore(), and EmitARCStoreStrong().
| llvm::Value * CodeGenFunction::EmitARCStoreWeak | ( | llvm::Value * | addr, |
| llvm::Value * | value, | ||
| bool | ignored | ||
| ) |
i8* (i8** addr, i8* value) Returns value.
Definition at line 2067 of file CGObjC.cpp.
References emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getARCEntrypoints(), and clang::CodeGen::ARCEntrypoints::objc_storeWeak.
Referenced by EmitScalarInit(), and EmitStoreThroughLValue().
Definition at line 1471 of file CGBuiltin.cpp.
References Arg, Args, clang::NeonTypeFlags::Float16, clang::NeonTypeFlags::Float32, clang::CallExpr::getArg(), clang::CallExpr::getDirectCallee(), clang::NamedDecl::getName(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::ValueDecl::getType(), clang::Expr::isIntegerConstantExpr(), and NULL.
| 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 1288 of file CGDecl.cpp.
References Builder, createBasicBlock(), EmitBlock(), 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 847 of file CodeGenFunction.cpp.
References Builder, ConvertType(), clang::ASTContext::getAsArrayType(), getContext(), clang::ArrayType::getElementType(), getElementType(), getVLASize(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitCXXAggrConstructorCall(), and emitDestroy().
| LValue CodeGenFunction::EmitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E | ) |
Definition at line 1766 of file CGExpr.cpp.
References Args, Builder, EmitCastToVoidPtr(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::CodeGen::LValue::getAlignment(), clang::ArraySubscriptExpr::getBase(), getContext(), clang::ArraySubscriptExpr::getIdx(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::CharUnits::getQuantity(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::QualType::isNull(), clang::Expr::isOBJCGCCandidate(), clang::LangOptions::isSignedOverflowDefined(), clang::CodeGen::LValue::isSimple(), isSimpleArrayDecayOperand(), clang::CharUnits::isZero(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::CodeGen::LValue::MakeVectorElt(), clang::LangOptions::NonGC, and setObjCGCLValueClass().
Referenced by EmitLValue().
| void CodeGenFunction::EmitAsmStmt | ( | const AsmStmt & | S | ) |
Definition at line 1398 of file CGStmt.cpp.
References AddVariableConstraints(), clang::TargetCodeGenInfo::adjustInlineAsmType(), clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), clang::AsmStmt::AnalyzeAsmString(), Args, Builder, CGM, ConvertType(), ConvertTypeForMem(), EmitLValue(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getAsmSrcLocInfo(), clang::AsmStmt::getAsmString(), clang::AsmStmt::getClobber(), clang::TargetInfo::getClobbers(), getContext(), clang::AsmStmt::getInputConstraint(), clang::AsmStmt::getInputExpr(), clang::AsmStmt::getInputName(), getLLVMContext(), clang::TargetInfo::getNormalizedGCCRegisterName(), clang::AsmStmt::getNumClobbers(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::AsmStmt::getOutputConstraint(), clang::AsmStmt::getOutputExpr(), clang::AsmStmt::getOutputName(), clang::StringLiteral::getString(), clang::CodeGen::CodeGenModule::getTargetData(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), hasAggregateLLVMType(), clang::TargetInfo::ConstraintInfo::hasMatchingInput(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::Expr::IgnoreParenNoopCasts(), Input, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::TargetInfo::ConstraintInfo::isReadWrite(), clang::AsmStmt::isVolatile(), S, SimplifyConstraint(), Target, clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateOutputConstraint(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitStmt().
| RValue CodeGenFunction::EmitAtomicExpr | ( | AtomicExpr * | E, |
| llvm::Value * | Dest = 0 |
||
| ) |
Definition at line 2824 of file CGExpr.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, clang::prec::And, Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), clang::ASTContext::BoolTy, Builder, CGM, ConvertTempToRValue(), createBasicBlock(), CreateMemTemp(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurFn, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitAtomicOp(), EmitCall(), EmitCastToVoidPtr(), EmitComplexExprIntoAddr(), EmitScalarExpr(), EmitScalarInit(), EmitStoreOfScalar(), EmitUnsupportedRValue(), EmitValToTemp(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::RValue::get(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLLVMContext(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::AtomicExpr::getNumSubExprs(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::AtomicExpr::getPtr(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getSize(), clang::ASTContext::getTargetInfo(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), hasAggregateLLVMType(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::AtomicExpr::isCmpXChg(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, clang::AtomicExpr::isVolatile(), clang::CodeGen::LValue::MakeAddr(), MakeAddrLValue(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.
| void CodeGenFunction::EmitAttributedStmt | ( | const AttributedStmt & | S | ) |
Definition at line 338 of file CGStmt.cpp.
References EmitStmt(), and clang::AttributedStmt::getSubStmt().
Referenced by EmitSimpleStmt().
| CodeGenFunction::AutoVarEmission CodeGenFunction::EmitAutoVarAlloca | ( | const VarDecl & | D | ) |
EmitAutoVarAlloca - Emit the alloca and debug information for a local variable. Does not emit initalization or destruction.
Definition at line 764 of file CGDecl.cpp.
References BuildByRefType(), Builder, CGM, ConvertTypeForMem(), CreateStaticVarDecl(), CreateTempAlloca(), clang::CodeGenOptions::DebugInfo, EHStack, EmitStaticVarDecl(), EmitVarAnnotations(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::ASTContext::getBaseElementType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::TargetInfo::getPointerAlign(), clang::CharUnits::getQuantity(), clang::VarDecl::getStorageClass(), clang::ValueDecl::getType(), getVLASize(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::InternalLinkage, clang::Expr::isConstantInitializer(), clang::VarDecl::isNRVOVariable(), clang::QualType::isPODType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGenOptions::LimitedDebugInfo, clang::CodeGenOptions::MergeAllConstants, clang::CodeGen::NormalCleanup, NRVOFlags, ReturnValue, clang::SC_Register, Target, and clang::TargetInfo::useGlobalsForAutomaticVariables().
Referenced by BeginCatch(), EmitAutoVarDecl(), and EmitObjCForCollectionStmt().
| void CodeGenFunction::EmitAutoVarCleanups | ( | const AutoVarEmission & | emission | ) |
Definition at line 1172 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), CGM, EHStack, emitAutoVarTypeCleanup(), enterByrefCleanup(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Decl::getAttr(), getLangOpts(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::QualType::isDestructedType(), clang::LangOptions::NonGC, clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by BeginCatch(), EmitAutoVarDecl(), and EmitObjCForCollectionStmt().
| 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 755 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 984 of file CGDecl.cpp.
References Builder, CGM, ContainsLabel(), emitByrefStructureInit(), clang::CodeGen::CodeGenModule::EmitConstantInit(), EmitExprAsInit(), emitStoresForInitAfterMemset(), EnsureInsertPoint(), getContext(), clang::VarDecl::getInit(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::CharUnits::getQuantity(), GetStaticDeclName(), clang::CodeGen::CodeGenModule::getTargetData(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, isCapturedBy(), isTrivialInitializer(), clang::QualType::isVolatileQualified(), MakeAddrLValue(), clang::CodeGen::LValue::setNonGC(), and shouldUseMemSetPlusStoresToInitialize().
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 1115 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(), getDestroyer(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::isARCPseudoStrong(), and clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitAutoVarCleanups().
| LValue CodeGenFunction::EmitBinaryOperatorLValue | ( | const BinaryOperator * | E | ) |
Definition at line 2458 of file CGExpr.cpp.
References clang::BO_Assign, clang::BO_Comma, clang::BO_PtrMemD, clang::BO_PtrMemI, EmitAggExprToLValue(), EmitAnyExpr(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitComplexAssignmentLValue(), EmitIgnoredExpr(), EmitLValue(), EmitPointerToDataMemberBinaryExpr(), EmitStoreThroughLValue(), EnsureInsertPoint(), clang::BinaryOperator::getLHS(), clang::QualType::getObjCLifetime(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), hasAggregateLLVMType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
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 244 of file CGStmt.cpp.
References Builder, CurFn, and EmitBranch().
Referenced by EmitAggMemberInitializer(), emitArrayDestroy(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallOrInvoke(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDefaultStmt(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastCall(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), EmitForStmt(), EmitIfStmt(), EmitLabel(), EmitLandingPad(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitReturnBlock(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeidFromVTable(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), FinishFunction(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getTrapBB(), 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 281 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 844 of file CGBlocks.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), Args, clang::CodeGen::RValue::get(), 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 2949 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 610 of file CGBlocks.cpp.
References computeBlockInfo(), findAndRemoveBlockInfo(), clang::BlockExpr::getBlockDecl(), and clang::BlockDecl::hasCaptures().
| llvm::Value * CodeGenFunction::EmitBlockLiteral | ( | const CGBlockInfo & | Info | ) |
Definition at line 629 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_SIGNATURE, clang::CodeGen::BLOCK_USE_STRET, buildBlockDescriptor(), buildGlobalBlock(), clang::CodeGen::CGBlockInfo::CanBeGlobal, clang::BlockDecl::capture_begin(), clang::BlockDecl::capture_end(), 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::CodeGen::CGBlockInfo::Capture::getIndex(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CGBlockInfo::HasCXXObject, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::BlockDecl::isConversionFromLambda(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::CGBlockInfo::NeedsCopyDispose, clang::ImplicitCastExpr::OnStack, clang::CodeGen::CGBlockInfo::UsesStret, clang::VK_LValue, clang::VK_RValue, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
| 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 264 of file CGStmt.cpp.
References Builder.
Referenced by EmitAggMemberInitializer(), EmitBlock(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXForRangeStmt(), EmitDynamicCast(), EmitForStmt(), EmitIfStmt(), EmitIndirectGotoStmt(), EmitWhileStmt(), and getTrapBB().
| void CodeGenFunction::EmitBranchOnBoolExpr | ( | const Expr * | Cond, |
| llvm::BasicBlock * | TrueBlock, | ||
| llvm::BasicBlock * | FalseBlock | ||
| ) |
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 572 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), clang::BO_LAnd, clang::BO_LOr, Builder, ConstantFoldsToSimpleInteger(), createBasicBlock(), EmitBlock(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::Expr::IgnoreParens(), and clang::UO_LNot.
Referenced by EmitConditionalOperatorLValue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), and EmitIfStmt().
| void CodeGenFunction::EmitBranchThroughCleanup | ( | JumpDest | Dest | ) |
EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to
Terminate the current block by emitting a branch which might leave the current cleanup-protected scope. The target scope may not yet be known, in which case this will require a fixup.
As a side-effect, this method clears the insertion point.
Definition at line 873 of file CGCleanup.cpp.
References clang::CodeGen::EHCleanupScope::addBranchAfter(), clang::CodeGen::EHCleanupScope::addBranchThrough(), 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(), Index, 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(), EmitGotoStmt(), EmitIndirectGotoStmt(), EmitReturnStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
| void CodeGenFunction::EmitBreakStmt | ( | const BreakStmt & | S | ) |
Definition at line 796 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 174 of file CGBuiltin.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, clang::prec::And, Arg, Args, BuiltinInfo, EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitFAbs(), EmitFromInt(), emitLibraryCall(), EmitToInt(), clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateAsRValue(), FirstArg, fma, clang::ASTContext::GE_None, clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CallExpr::getArg(), clang::CallExpr::getCallee(), clang::Expr::getExprLoc(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::CallExpr::getNumArgs(), clang::CharUnits::getQuantity(), clang::Expr::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(), pow, and clang::Expr::EvalResult::Val.
Referenced by EmitCallExpr().
| void CodeGenFunction::emitByrefStructureInit | ( | const AutoVarEmission & | emission | ) |
Initialize the structural components of a __block variable, i.e. everything but the actual object.
Definition at line 1916 of file CGBlocks.cpp.
References clang::CodeGen::BLOCK_HAS_COPY_DISPOSE, buildByrefHelpers(), clang::CodeGen::BlockFlags::getBitMask(), getElementType(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, and clang::QualType::isObjCGCWeak().
Referenced by EmitAutoVarInit().
| RValue CodeGenFunction::EmitCall | ( | const CGFunctionInfo & | FnInfo, |
| llvm::Value * | Callee, | ||
| ReturnValueSlot | ReturnValue, | ||
| const CallArgList & | Args, | ||
| const Decl * | TargetDecl = 0, |
||
| llvm::Instruction ** | callOrInvoke = 0 |
||
| ) |
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 1859 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Args, BuildAggStore(), Builder, CGM, checkArgMatches(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), ConvertType(), createBasicBlock(), CreateCoercedLoad(), CreateCoercedStore(), CreateMemTemp(), clang::ABIArgInfo::Direct, EmitAggregateCopy(), EmitBlock(), EmitLoadOfScalar(), EmitStoreOfScalar(), emitWritebacks(), EnsureInsertPoint(), clang::ABIArgInfo::Expand, clang::ABIArgInfo::Extend, clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getAggregateAddr(), clang::ABIArgInfo::getCoerceToType(), clang::CodeGen::RValue::getComplex(), clang::CodeGen::RValue::getComplexVal(), getContext(), clang::ABIArgInfo::getDirectOffset(), getElementType(), clang::ABIArgInfo::getIndirectAlign(), clang::ABIArgInfo::getIndirectByVal(), getInvokeDest(), clang::ABIArgInfo::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ABIArgInfo::getPaddingType(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getTargetData(), clang::ASTContext::getTypeAlignInChars(), GetUndefRValue(), clang::CodeGen::ReturnValueSlot::getValue(), hasAggregateLLVMType(), clang::CodeGen::CallArgList::hasWritebacks(), clang::ABIArgInfo::Ignore, clang::ABIArgInfo::Indirect, clang::CodeGen::RValue::isComplex(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::ReturnValueSlot::isVolatile(), clang::CodeGen::RValue::isVolatileQualified(), LoadComplexFromAddr(), clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), and StoreComplexToAddr().
Referenced by EmitAtomicExpr(), EmitCall(), EmitCallExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXMemberCall(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitDelegateCXXConstructorCall(), EmitDeleteCall(), EmitForwardingCallToLambda(), emitLibraryCall(), EmitObjCForCollectionStmt(), emitStructGetterCall(), emitStructSetterCall(), EmitSynthesizedCXXCopyCtorCall(), generateObjCGetterBody(), generateObjCSetterBody(), and GenerateThunk().
| RValue CodeGenFunction::EmitCall | ( | QualType | FnType, |
| llvm::Value * | Callee, | ||
| ReturnValueSlot | ReturnValue, | ||
| CallExpr::const_arg_iterator | ArgBeg, | ||
| CallExpr::const_arg_iterator | ArgEnd, | ||
| const Decl * | TargetDecl = 0 |
||
| ) |
Definition at line 2612 of file CGExpr.cpp.
References Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), Builder, CGM, EmitCall(), clang::ASTContext::getCanonicalType(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), getTypes(), and clang::CodeGen::CGFunctionInfo::isVariadic().
| void CodeGenFunction::EmitCallArg | ( | CallArgList & | args, |
| const Expr * | E, | ||
| QualType | ArgType | ||
| ) |
EmitCallArg - Emit a single call argument.
Definition at line 1707 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::LValue::asAggregateRValue(), clang::CK_LValueToRValue, EmitAnyExprToTemp(), EmitLValue(), EmitReferenceBindingToExpr(), emitWritebackArg(), getContext(), getLangOpts(), clang::Expr::getObjectKind(), clang::Expr::getType(), hasAggregateLLVMType(), clang::Expr::isGLValue(), clang::CodeGen::LValue::isSimple(), and clang::OK_Ordinary.
Referenced by EmitCXXNewExpr(), and EmitSynthesizedCXXCopyCtorCall().
| RValue CodeGenFunction::EmitCallExpr | ( | const CallExpr * | E, |
| ReturnValueSlot | ReturnValue = ReturnValueSlot() |
||
| ) |
Definition at line 2374 of file CGExpr.cpp.
References clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), Builder, EmitARCDestroyWeak(), EmitARCRelease(), EmitBlockCallExpr(), EmitBuiltinExpr(), EmitCall(), EmitCUDAKernelCallExpr(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), getContext(), getDebugInfo(), getLangOpts(), clang::CallExpr::getLocStart(), clang::QualType::getObjCLifetime(), clang::PointerType::getPointeeType(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::Expr::IgnoreParens(), NULL, 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().
Definition at line 2502 of file CGExpr.cpp.
References EmitCallExpr(), clang::CodeGen::RValue::getAggregateAddr(), clang::CallExpr::getCallReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), 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 1750 of file CGCall.cpp.
References Builder, CGM, createBasicBlock(), EmitBlock(), getInvokeDest(), and clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by EmitBadCastCall(), EmitBadTypeidCall(), and EmitCallOrInvoke().
| llvm::CallSite CodeGenFunction::EmitCallOrInvoke | ( | llvm::Value * | Callee, |
| const Twine & | Name = "" |
||
| ) |
Definition at line 1773 of file CGCall.cpp.
References EmitCallOrInvoke().
| void CodeGenFunction::EmitCaseStmt | ( | const CaseStmt & | S | ) |
Definition at line 880 of file CGStmt.cpp.
References Builder, CGM, createBasicBlock(), EmitBlock(), EmitCaseStmtRange(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CaseStmt::getLHS(), clang::CaseStmt::getRHS(), clang::CaseStmt::getSubStmt(), isObviouslyBranchWithoutCleanups(), clang::CodeGenOptions::OptimizationLevel, 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 825 of file CGStmt.cpp.
References Builder, createBasicBlock(), CurFn, EmitBlock(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), getContext(), clang::CaseStmt::getLHS(), clang::CaseStmt::getRHS(), and clang::CaseStmt::getSubStmt().
Referenced by EmitCaseStmt().
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 2204 of file CGExpr.cpp.
References Builder, 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_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::Expr::Classify(), ConvertType(), CreateMemTemp(), EmitAggExprToLValue(), EmitAnyExprToMem(), EmitDynamicCast(), EmitLValue(), EmitUnsupportedLValue(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::CastExpr::getCastKind(), getContext(), clang::RecordType::getDecl(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getQualifiers(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), MakeAddrLValue(), clang::CastExpr::path_begin(), and clang::CastExpr::path_end().
Referenced by EmitLValue().
| llvm::Value * CodeGenFunction::EmitCastToVoidPtr | ( | llvm::Value * | value | ) |
Emit a cast to void* in the appropriate address space.
Definition at line 36 of file CGExpr.cpp.
References Builder, getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitArraySubscriptExpr(), EmitAtomicExpr(), EmitDynamicCastCall(), EmitLoadOfBitfieldLValue(), EmitNullBaseClassInitialization(), EmitStoreThroughBitfieldLValue(), and EmitZeroMemSet().
| void CodeGenFunction::EmitCheck | ( | llvm::Value * | Address, |
| unsigned | Size | ||
| ) |
Definition at line 519 of file CGExpr.cpp.
References Builder, CatchUndefined, CGM, createBasicBlock(), EmitBlock(), clang::CodeGen::CodeGenModule::getIntrinsic(), getTrapBB(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by EmitCheckedLValue().
EmitCheckedLValue - 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 611 of file CGExpr.cpp.
References EmitCheck(), EmitLValue(), clang::CodeGen::LValue::getAddress(), getContext(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::LValue::isBitField(), and clang::CodeGen::LValue::isSimple().
| LValue CodeGenFunction::EmitComplexAssignmentLValue | ( | const BinaryOperator * | E | ) |
Emit an l-value for an assignment (simple or compound) of complex type.
Definition at line 818 of file CGExprComplex.cpp.
References clang::BO_Assign, and clang::BinaryOperator::getOpcode().
Referenced by EmitBinaryOperatorLValue().
| LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 825 of file CGExprComplex.cpp.
References clang::BO_AddAssign, clang::BO_DivAssign, clang::BO_MulAssign, clang::BO_SubAssign, 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 784 of file CGExprComplex.cpp.
References clang::Expr::getType().
Referenced by EmitAnyExpr(), EmitExprAsInit(), and EvaluateExprAsBool().
| void CodeGenFunction::EmitComplexExprIntoAddr | ( | const Expr * | E, |
| llvm::Value * | DestAddr, | ||
| bool | DestIsVolatile | ||
| ) |
EmitComplexExprIntoAddr - Emit the computation of the specified expression of complex type, storing into the specified Value*.
Definition at line 795 of file CGExprComplex.cpp.
References clang::Expr::getType().
Referenced by EmitAggMemberInitializer(), EmitAnyExprToMem(), EmitAtomicExpr(), EmitDeclInit(), EmitInitializerForField(), EmitReturnStmt(), and StoreAnyExprIntoOneUnit().
| CodeGenFunction::ComplexPairTy CodeGenFunction::EmitComplexPrePostIncDec | ( | const UnaryOperator * | E, |
| LValue | LV, | ||
| bool | isInc, | ||
| bool | isPre | ||
| ) |
Definition at line 539 of file CGExpr.cpp.
References Builder, clang::CodeGen::LValue::getAddress(), getContext(), getElementType(), getLLVMContext(), clang::Expr::getType(), clang::CodeGen::LValue::isVolatileQualified(), LoadComplexFromAddr(), and StoreComplexToAddr().
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 2767 of file CGExprScalar.cpp.
References hasAggregateLLVMType().
Referenced by EvaluateExprAsBool().
| LValue CodeGenFunction::EmitCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 2811 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().
| LValue CodeGenFunction::EmitCompoundLiteralLValue | ( | const CompoundLiteralExpr * | E | ) |
Definition at line 2112 of file CGExpr.cpp.
References CGM, CreateMemTemp(), EmitAnyExprToMem(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCompoundLiteral(), clang::CompoundLiteralExpr::getInitializer(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::CompoundLiteralExpr::isFileScope(), and MakeAddrLValue().
Referenced by EmitLValue().
| RValue 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 192 of file CGStmt.cpp.
References clang::CompoundStmt::body_back(), clang::CompoundStmt::body_begin(), clang::CompoundStmt::body_end(), EmitAnyExpr(), EmitLabel(), EmitStmt(), EnsureInsertPoint(), clang::CodeGen::RValue::get(), getContext(), clang::CompoundStmt::getLBracLoc(), and clang::CompoundStmt::getSourceRange().
Referenced by EmitSimpleStmt().
| LValue CodeGenFunction::EmitConditionalOperatorLValue | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 2139 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, ConstantFoldsToSimpleInteger(), ContainsLabel(), createBasicBlock(), EmitAggExprToLValue(), EmitBlock(), EmitBranchOnBoolExpr(), EmitLValue(), EmitUnsupportedLValue(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), clang::CodeGen::LValue::getAddress(), clang::AbstractConditionalOperator::getCond(), clang::AbstractConditionalOperator::getFalseExpr(), clang::AbstractConditionalOperator::getTrueExpr(), clang::Expr::getType(), hasAggregateLLVMType(), clang::Expr::isGLValue(), clang::CodeGen::LValue::isSimple(), and MakeAddrLValue().
Referenced by EmitLValue().
| void CodeGenFunction::EmitConstructorBody | ( | FunctionArgList & | Args | ) |
EmitConstructorBody - Emits the body of the current constructor.
Definition at line 714 of file CGClass.cpp.
References Builder, CGM, clang::Ctor_Base, clang::Ctor_Complete, CurGD, clang::CXXABI_Microsoft, EHStack, EmitCtorPrologue(), EmitDelegateCXXConstructorCall(), EmitStmt(), EnterCXXTryStmt(), ExitCXXTryStmt(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getContext(), clang::GlobalDecl::getCtorType(), clang::TargetInfo::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::Decl::getLocEnd(), clang::ASTContext::getTargetInfo(), IsConstructorDelegationValid(), PopCleanupBlocks(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by GenerateCode().
| void CodeGenFunction::EmitContinueStmt | ( | const ContinueStmt & | S | ) |
Definition at line 809 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 763 of file CGClass.cpp.
References EmitBaseInitializer(), EmitDelegatingCXXConstructorCall(), EmitMemberInitializer(), clang::CXXMethodDecl::getParent(), 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 351 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, | ||
| CallExpr::const_arg_iterator | argBegin, | ||
| CallExpr::const_arg_iterator | argEnd, | ||
| 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 |
| argBegin,argEnd | the arguments to evaluate and pass to the constructor |
| 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 1096 of file CGClass.cpp.
References emitArrayLength().
Referenced by EmitCXXConstructExpr(), and EmitNewInitializer().
| void CodeGenFunction::EmitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
| llvm::Value * | numElements, | ||
| llvm::Value * | arrayBegin, | ||
| CallExpr::const_arg_iterator | argBegin, | ||
| CallExpr::const_arg_iterator | argEnd, | ||
| 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 |
| argBegin,argEnd | the arguments to evaluate and pass to the constructor |
| 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 1122 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(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
| LValue CodeGenFunction::EmitCXXBindTemporaryLValue | ( | const CXXBindTemporaryExpr * | E | ) |
Definition at line 2534 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 400 of file CGExprCXX.cpp.
References clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), 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(), clang::ASTContext::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().
| LValue CodeGenFunction::EmitCXXConstructLValue | ( | const CXXConstructExpr * | E | ) |
Definition at line 2520 of file CGExpr.cpp.
References CreateAggTemp(), EmitCXXConstructExpr(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
| void CodeGenFunction::EmitCXXConstructorCall | ( | const CXXConstructorDecl * | D, |
| CXXCtorType | Type, | ||
| bool | ForVirtualBase, | ||
| llvm::Value * | This, | ||
| CallExpr::const_arg_iterator | ArgBeg, | ||
| CallExpr::const_arg_iterator | ArgEnd | ||
| ) |
Definition at line 1223 of file CGClass.cpp.
References CGM, clang::CodeGenOptions::DebugInfo, EmitAggregateCopy(), EmitCXXMemberCall(), EmitLValue(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), getDebugInfo(), clang::Decl::getLocation(), clang::CodeGen::CGDebugInfo::getOrCreateRecordType(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTypeDeclType(), GetVTTParameter(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::FunctionDecl::isTrivial(), and clang::CodeGenOptions::LimitedDebugInfo.
Referenced by EmitCXXAggrConstructorCall(), and EmitCXXConstructExpr().
| void CodeGenFunction::EmitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 1511 of file CGExprCXX.cpp.
References Arg, Builder, clang::CK_UserDefinedConversion, ConvertTypeForMem(), createBasicBlock(), EmitArrayDelete(), EmitBlock(), EmitObjectDelete(), EmitScalarExpr(), clang::CXXDeleteExpr::getArgument(), getContext(), getElementType(), clang::CXXDeleteExpr::getOperatorDelete(), clang::Expr::getType(), clang::CXXDeleteExpr::isArrayForm(), and clang::CXXDeleteExpr::isGlobalDelete().
| void CodeGenFunction::EmitCXXDestructorCall | ( | const CXXDestructorDecl * | D, |
| CXXDtorType | Type, | ||
| bool | ForVirtualBase, | ||
| llvm::Value * | This | ||
| ) |
Definition at line 1399 of file CGClass.cpp.
References BuildAppleKextVirtualDestructorCall(), CGM, EmitCXXMemberCall(), clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(), getContext(), getLangOpts(), clang::CXXMethodDecl::getParent(), and GetVTTParameter().
Referenced by EmitDestructorBody(), and EmitObjectDelete().
| void CodeGenFunction::EmitCXXForRangeStmt | ( | const CXXForRangeStmt & | S | ) |
Definition at line 658 of file CGStmt.cpp.
References Builder, createBasicBlock(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitStmt(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::SourceRange::getBegin(), clang::CXXForRangeStmt::getBeginEndStmt(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CXXForRangeStmt::getBody(), clang::CXXForRangeStmt::getCond(), getDebugInfo(), clang::SourceRange::getEnd(), clang::CXXForRangeStmt::getInc(), getJumpDestInCurrentScope(), clang::CXXForRangeStmt::getLoopVarStmt(), clang::CXXForRangeStmt::getRangeStmt(), clang::CXXForRangeStmt::getSourceRange(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
Referenced by 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 124 of file CGDeclCXX.cpp.
References CGM, EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitReferenceBindingToExpr(), EmitStoreOfScalar(), getContext(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), 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 200 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CGCXXABI::EmitGuardedInit(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGenOptions::ForbidGuardVariables, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::Decl::getLocation().
Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().
| RValue CodeGenFunction::EmitCXXMemberCall | ( | const CXXMethodDecl * | MD, |
| llvm::Value * | Callee, | ||
| ReturnValueSlot | ReturnValue, | ||
| llvm::Value * | This, | ||
| llvm::Value * | VTT, | ||
| CallExpr::const_arg_iterator | ArgBeg, | ||
| CallExpr::const_arg_iterator | ArgEnd | ||
| ) |
Definition at line 26 of file CGExprCXX.cpp.
References Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), CGM, EmitCall(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), getContext(), clang::FunctionType::getExtInfo(), clang::ASTContext::getPointerType(), clang::FunctionType::getResultType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXMethodDecl::isInstance(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), and EmitObjectDelete().
| RValue CodeGenFunction::EmitCXXMemberCallExpr | ( | const CXXMemberCallExpr * | E, |
| ReturnValueSlot | ReturnValue | ||
| ) |
Definition at line 171 of file CGExprCXX.cpp.
References clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeCXXDestructor(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), BuildAppleKextVirtualCall(), BuildVirtualCall(), canDevirtualizeMemberFunctionCalls(), CGM, clang::Ctor_Complete, clang::CodeGenOptions::DebugInfo, clang::Dtor_Complete, EmitAggregateCopy(), EmitCall(), EmitCXXMemberCall(), EmitCXXMemberPointerCallExpr(), EmitLValue(), EmitScalarExpr(), EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::MemberExpr::getBase(), clang::CallExpr::getCallee(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getQualifier(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::MemberExpr::hasQualifier(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::IgnoreParens(), clang::MemberExpr::isArrow(), clang::CodeGenOptions::LimitedDebugInfo, and UseVirtualCall().
Referenced by EmitCallExpr().
| RValue CodeGenFunction::EmitCXXMemberPointerCallExpr | ( | const CXXMemberCallExpr * | E, |
| ReturnValueSlot | ReturnValue | ||
| ) |
Definition at line 285 of file CGExprCXX.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), clang::BO_PtrMemI, CGM, EmitCall(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::CallExpr::getCallee(), clang::MemberPointerType::getClass(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), 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(), and ReturnValue.
Referenced by EmitCXXMemberCallExpr().
| llvm::Value * CodeGenFunction::EmitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 1116 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CalculateCookiePadding(), CGM, ConvertTypeForMem(), createBasicBlock(), DeactivateCleanupBlock(), EmitBlock(), EmitCall(), EmitCallArg(), EmitCXXNewAllocSize(), EmitNewInitializer(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CXXNewExpr::getAllocatedType(), clang::FunctionProtoType::getArgType(), clang::ASTContext::getBaseElementType(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXNewExpr::getInitializer(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumArgs(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getSizeType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), 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::FunctionProtoType::isVariadic(), 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 1734 of file CGClass.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), BuildVirtualCall(), CGM, clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), and UseVirtualCall().
Referenced by EmitCXXOperatorMemberCallExpr().
| RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr | ( | const CXXOperatorCallExpr * | E, |
| const CXXMethodDecl * | MD, | ||
| ReturnValueSlot | ReturnValue | ||
| ) |
Definition at line 330 of file CGExprCXX.cpp.
References clang::CallExpr::arg_begin(), clang::CallExpr::arg_end(), EmitAggregateCopy(), EmitCXXMemberCall(), EmitCXXOperatorMemberCallee(), EmitLValue(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::Expr::getType(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXMethodDecl::isInstance(), clang::CXXMethodDecl::isMoveAssignmentOperator(), and clang::FunctionDecl::isTrivial().
Referenced by EmitCallExpr().
| 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 1098 of file CGCleanup.cpp.
References clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitCXXBindTemporaryLValue().
| void CodeGenFunction::EmitCXXThrowExpr | ( | const CXXThrowExpr * | E | ) |
Definition at line 403 of file CGException.cpp.
References Builder, CGM, ConvertType(), createBasicBlock(), clang::Dtor_Complete, EmitAnyExprToExn(), EmitBlock(), clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getAllocateExceptionFn(), getContext(), clang::CXXRecordDecl::getDestructor(), getInvokeDest(), clang::CharUnits::getQuantity(), getReThrowFn(), clang::CXXThrowExpr::getSubExpr(), getThrowFn(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), getUnreachableBlock(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::SizeTy.
| void CodeGenFunction::EmitCXXTryStmt | ( | const CXXTryStmt & | S | ) |
Definition at line 563 of file CGException.cpp.
References EmitStmt(), EnterCXXTryStmt(), ExitCXXTryStmt(), and clang::CXXTryStmt::getTryBlock().
Referenced by EmitStmt().
| llvm::Value * CodeGenFunction::EmitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 1618 of file CGExprCXX.cpp.
References Builder, CGM, ConvertType(), EmitTypeidFromVTable(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CXXTypeidExpr::getExprOperand(), clang::Expr::getType(), clang::CXXTypeidExpr::getTypeOperand(), clang::Expr::isGLValue(), clang::CXXRecordDecl::isPolymorphic(), and clang::CXXTypeidExpr::isTypeOperand().
Referenced by EmitCXXTypeidLValue().
| LValue CodeGenFunction::EmitCXXTypeidLValue | ( | const CXXTypeidExpr * | E | ) |
Definition at line 2529 of file CGExpr.cpp.
References EmitCXXTypeidExpr(), 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 33 of file CGDecl.cpp.
References EmitVarDecl(), EmitVariablyModifiedType(), clang::Decl::getKind(), clang::TypedefNameDecl::getUnderlyingType(), and clang::VarDecl::isLocalVarDecl().
Referenced by EmitDeclStmt().
| void CodeGenFunction::EmitDeclRefExprDbgValue | ( | const DeclRefExpr * | E, |
| llvm::Constant * | Init | ||
| ) |
Definition at line 1086 of file CodeGenFunction.cpp.
References CGM, clang::CodeGenOptions::DebugInfo, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::DeclRefExpr::getDecl(), and clang::CodeGenOptions::LimitedDebugInfo.
Referenced by tryEmitAsConstant().
| LValue CodeGenFunction::EmitDeclRefLValue | ( | const DeclRefExpr * | E | ) |
Definition at line 1527 of file CGExpr.cpp.
References BuildBlockByrefAddress(), Builder, CGM, CurCodeDecl, EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitLValueForField(), GetAddrOfBlockDecl(), getContext(), clang::DeclRefExpr::getDecl(), clang::ASTContext::getDeclAlign(), clang::DeclRefExpr::getLocation(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getStaticLocalDeclAddress(), clang::ASTContext::getTagDeclType(), clang::Expr::getType(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Decl::hasAttr(), clang::Decl::isUsed(), clang::SourceLocation::isValid(), LambdaCaptureFields, MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::DeclRefExpr::refersToEnclosingLocal(), clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::LValue::setNonGC(), and setObjCGCLValueClass().
Referenced by EmitLValue().
| void CodeGenFunction::EmitDeclStmt | ( | const DeclStmt & | S | ) |
Definition at line 785 of file CGStmt.cpp.
References clang::DeclStmt::decl_begin(), clang::DeclStmt::decl_end(), EmitDecl(), EmitStopPoint(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
| void CodeGenFunction::EmitDefaultStmt | ( | const DefaultStmt & | S | ) |
Definition at line 948 of file CGStmt.cpp.
References EmitBlock(), EmitStmt(), and clang::DefaultStmt::getSubStmt().
Referenced by EmitSimpleStmt().
| void CodeGenFunction::EmitDelegateCallArg | ( | CallArgList & | args, |
| const VarDecl * | param | ||
| ) |
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 1536 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), Builder, EmitLoadOfScalar(), clang::CodeGen::RValue::get(), GetAddrOfLocalVar(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getComplex(), getContext(), clang::ASTContext::getDeclAlign(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), hasAggregateLLVMType(), and LoadComplexFromAddr().
Referenced by EmitDelegateCXXConstructorCall(), EmitLambdaBlockInvokeBody(), EmitLambdaDelegatingInvokeBody(), and GenerateThunk().
| void CodeGenFunction::EmitDelegateCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
| CXXCtorType | CtorType, | ||
| const FunctionArgList & | Args | ||
| ) |
Definition at line 1318 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorDeclaration(), CGM, CurGD, EmitCall(), EmitDelegateCallArg(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(), getContext(), clang::ASTContext::getPointerType(), clang::CodeGen::CodeGenModule::getTypes(), GetVTTParameter(), LoadCXXThis(), clang::CodeGen::CodeGenVTables::needsVTTParameter(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by EmitConstructorBody().
| void CodeGenFunction::EmitDelegatingCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
| const FunctionArgList & | Args | ||
| ) |
Definition at line 1372 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::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 1280 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), Builder, CGM, ConvertType(), EmitCall(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getContext(), clang::FunctionDecl::getOverloadedOperator(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), 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 1253 of file CGDecl.cpp.
References Builder, emitArrayDestroy(), emitArrayLength(), clang::ASTContext::getAsArrayType(), and getContext().
Referenced by generateDestroyHelper().
| void CodeGenFunction::EmitDestructorBody | ( | FunctionArgList & | Args | ) |
EmitDestructorBody - Emits the body of the current destructor.
Definition at line 882 of file CGClass.cpp.
References CanSkipVTablePointerInitialization(), CGM, CurFn, CurGD, clang::CXXABI_Microsoft, clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, EmitCXXDestructorCall(), EmitStmt(), EnterCXXTryStmt(), EnterDtorCleanups(), ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::TargetInfo::getCXXABI(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::ASTContext::getLangOpts(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTargetInfo(), InitializeVTablePointers(), clang::Decl::isImplicit(), LoadCXXThis(), and PopCleanupBlock().
Referenced by GenerateCode().
| void CodeGenFunction::EmitDoStmt | ( | const DoStmt & | S | ) |
Definition at line 518 of file CGStmt.cpp.
References Builder, createBasicBlock(), EmitBlock(), EmitStmt(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::DoStmt::getBody(), clang::DoStmt::getCond(), getJumpDestInCurrentScope(), and SimplifyForwardingBlocks().
Referenced by EmitStmt().
| llvm::Value * CodeGenFunction::EmitDynamicCast | ( | llvm::Value * | V, |
| const CXXDynamicCastExpr * | DCE | ||
| ) |
Definition at line 1766 of file CGExprCXX.cpp.
References Builder, createBasicBlock(), EmitBlock(), EmitBranch(), EmitDynamicCastCall(), EmitDynamicCastToNull(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), and clang::CXXDynamicCastExpr::isAlwaysNull().
Referenced by EmitCastLValue().
| void CodeGenFunction::EmitEndEHSpec | ( | const Decl * | D | ) |
EmitEndEHSpec - Emit the end of the exception spec.
Definition at line 540 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), CGM, EHStack, emitFilterDispatchBlock(), clang::EST_Dynamic, clang::EST_DynamicNone, 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 1086 of file CGDecl.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, drillIntoBlockVariable(), EmitAggExpr(), EmitComplexExpr(), EmitReferenceBindingToExpr(), EmitScalarInit(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::LValue::getAddress(), clang::ValueDecl::getType(), hasAggregateLLVMType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::LValue::isVolatile(), MaybeEmitStdInitializerListCleanup(), and StoreComplexToAddr().
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 2738 of file CGObjC.cpp.
References clang::CodeGen::RequiredArgs::All, Builder, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
| LValue CodeGenFunction::EmitExtVectorElementExpr | ( | const ExtVectorElementExpr * | E | ) |
Definition at line 1889 of file CGExpr.cpp.
References Builder, CreateMemTemp(), EmitLValue(), EmitScalarExpr(), GenerateConstantVector(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), 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(), MakeAddrLValue(), clang::CodeGen::LValue::MakeExtVectorElt(), and clang::QualType::withCVRQualifiers().
Referenced by EmitLValue().
| 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 1146 of file CodeGenFunction.cpp.
References Builder, CGM, EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Decl::specific_attr_begin(), and clang::Decl::specific_attr_end().
Referenced by EmitLValueForField().
| void CodeGenFunction::EmitForStmt | ( | const ForStmt & | S | ) |
Definition at line 565 of file CGStmt.cpp.
References Builder, createBasicBlock(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitStmt(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::SourceRange::getBegin(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::ForStmt::getBody(), clang::ForStmt::getCond(), clang::ForStmt::getConditionVariable(), getDebugInfo(), clang::SourceRange::getEnd(), clang::ForStmt::getInc(), clang::ForStmt::getInit(), getJumpDestInCurrentScope(), clang::ForStmt::getSourceRange(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
Referenced by EmitStmt().
| void CodeGenFunction::EmitForwardingCallToLambda | ( | const CXXRecordDecl * | Lambda, |
| CallArgList & | CallArgs | ||
| ) |
Definition at line 1747 of file CGClass.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), CGM, CurFnInfo, clang::ASTContext::DeclarationNames, EmitCall(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), getContext(), clang::DeclarationNameTable::getCXXOperatorName(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), hasAggregateLLVMType(), clang::ABIArgInfo::Indirect, clang::CodeGen::ReturnValueSlot::isNull(), clang::DeclContext::lookup(), 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 939 of file CGExpr.cpp.
References Builder, and hasBooleanRepresentation().
Referenced by EmitFromInt(), and EmitLoadOfScalar().
| void CodeGenFunction::EmitFunctionBody | ( | FunctionArgList & | Args | ) |
Definition at line 396 of file CodeGenFunction.cpp.
References CurGD, EmitStmt(), clang::FunctionDecl::getBody(), and clang::GlobalDecl::getDecl().
Referenced by EmitLambdaToBlockPointerBody(), and GenerateCode().
| void CodeGenFunction::EmitFunctionEpilog | ( | const CGFunctionInfo & | FI | ) |
EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.
Definition at line 1448 of file CGCall.cpp.
References AutoreleaseResult, Builder, ConvertType(), CreateCoercedLoad(), CurFn, clang::ABIArgInfo::Direct, emitAutoreleaseOfResult(), EmitStoreOfScalar(), clang::ABIArgInfo::Expand, clang::ABIArgInfo::Extend, findDominatingStoreToReturnValue(), clang::ABIArgInfo::getCoerceToType(), getContext(), clang::ABIArgInfo::getDirectOffset(), clang::ABIArgInfo::getKind(), getLangOpts(), clang::CharUnits::getQuantity(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::ASTContext::getTypeAlignInChars(), hasAggregateLLVMType(), clang::ABIArgInfo::Ignore, clang::ABIArgInfo::Indirect, clang::CodeGen::CGFunctionInfo::isReturnsRetained(), LoadComplexFromAddr(), ReturnValue, and StoreComplexToAddr().
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 228 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), CurFn, 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 1049 of file CGCall.cpp.
References Arg, clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), CreateCoercedStore(), CreateMemTemp(), CreateTempAlloca(), CurFuncDecl, clang::ABIArgInfo::Direct, emitArgumentDemotion(), EmitLoadOfScalar(), EmitParmDecl(), clang::ABIArgInfo::Expand, clang::ABIArgInfo::Extend, clang::ABIArgInfo::getCoerceToType(), getContext(), clang::ASTContext::getDeclAlign(), clang::ABIArgInfo::getDirectOffset(), getElementType(), clang::ABIArgInfo::getIndirectAlign(), clang::ABIArgInfo::getIndirectRealign(), clang::ABIArgInfo::getKind(), clang::NamedDecl::getName(), clang::ABIArgInfo::getPaddingType(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTargetData(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), hasAggregateLLVMType(), clang::ABIArgInfo::Ignore, Index, clang::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::QualType::isRestrictQualified(), MakeAddrLValue(), clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), and ReturnValue.
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 342 of file CGStmt.cpp.
References EmitBranchThroughCleanup(), EmitStopPoint(), getJumpDestForLabel(), clang::GotoStmt::getLabel(), and HaveInsertPoint().
Referenced by EmitSimpleStmt().
Definition at line 2456 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::CallExpr::getNumArgs().
| void CodeGenFunction::EmitIfStmt | ( | const IfStmt & | S | ) |
Definition at line 375 of file CGStmt.cpp.
References Builder, ConstantFoldsToSimpleInteger(), ContainsLabel(), createBasicBlock(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), EmitStmt(), clang::IfStmt::getCond(), clang::IfStmt::getConditionVariable(), getDebugInfo(), clang::IfStmt::getElse(), and clang::IfStmt::getThen().
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 99 of file CGExpr.cpp.
References EmitAnyExpr(), EmitLValue(), clang::CodeGen::AggValueSlot::ignored(), and clang::Expr::isRValue().
Referenced by EmitBinaryOperatorLValue(), emitPseudoObjectExpr(), EmitStmt(), EmitVariablyModifiedType(), and tryEmitARCRetainPseudoObject().
| void CodeGenFunction::EmitIndirectGotoStmt | ( | const IndirectGotoStmt & | S | ) |
Definition at line 353 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 606 of file CGClass.cpp.
References Builder, CGM, ConvertType(), CreateTempAlloca(), clang::CodeGen::EHCleanup, EHStack, EmitAggMemberInitializer(), EmitAutoVarDecl(), EmitComplexExprIntoAddr(), EmitExprAsInit(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ASTContext::getBaseElementType(), getContext(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getDestructor(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ValueDecl::getType(), hasAggregateLLVMType(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVolatileQualified(), MakeAddrLValue(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitLambdaExpr(), and EmitMemberInitializer().
| LValue CodeGenFunction::EmitInitListLValue | ( | const InitListExpr * | E | ) |
Definition at line 2128 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 2568 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 310 of file CGStmt.cpp.
References EHStack, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), getJumpDestInCurrentScope(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), ResolveBranchFixups(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by EmitCompoundStmt(), and EmitLabelStmt().
| void CodeGenFunction::EmitLabelStmt | ( | const LabelStmt & | S | ) |
Definition at line 333 of file CGStmt.cpp.
References EmitLabel(), EmitStmt(), clang::LabelStmt::getDecl(), and clang::LabelStmt::getSubStmt().
Referenced by EmitSimpleStmt().
| void CodeGenFunction::EmitLambdaBlockInvokeBody | ( | ) |
Definition at line 1781 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), BlockInfo, clang::BlockDecl::capture_begin(), EmitDelegateCallArg(), EmitForwardingCallToLambda(), clang::CodeGen::RValue::get(), GetAddrOfBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockDecl(), getContext(), clang::ASTContext::getPointerType(), getRecordType(), clang::ValueDecl::getType(), clang::BlockDecl::param_begin(), and clang::BlockDecl::param_end().
| void CodeGenFunction::EmitLambdaDelegatingInvokeBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 1814 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), ConvertType(), EmitDelegateCallArg(), EmitForwardingCallToLambda(), clang::CodeGen::RValue::get(), getContext(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), getRecordType(), getTypes(), clang::FunctionDecl::param_begin(), and clang::FunctionDecl::param_end().
Referenced by EmitLambdaStaticInvokeFunction().
| void CodeGenFunction::EmitLambdaExpr | ( | const LambdaExpr * | E, |
| AggValueSlot | Dest | ||
| ) |
Definition at line 1815 of file CGExprCXX.cpp.
References clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), EmitInitializerForField(), EmitLValueForFieldInitialization(), clang::RecordDecl::field_begin(), 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 2543 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 1834 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 1803 of file CGClass.cpp.
References CGM, CurFuncDecl, EmitFunctionBody(), and clang::CodeGen::CodeGenModule::ErrorUnsupported().
Referenced by GenerateCode().
| llvm::BasicBlock * CodeGenFunction::EmitLandingPad | ( | ) |
Emits a landing pad for the current EH stack.
Definition at line 736 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), Builder, clang::CodeGen::EHScope::Catch, CGM, CHL_MandatoryCatchall, clang::CodeGen::EHScope::Cleanup, CleanupHackLevel, createBasicBlock(), EHStack, EmitBlock(), clang::CodeGen::EHScopeStack::end(), clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), getCatchAllValue(), getEHDispatchBlock(), getEHSelectorSlot(), getExceptionSlot(), clang::CodeGen::EHFilterScope::getFilter(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), getLangOpts(), 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 1009 of file CGExpr.cpp.
References clang::CodeGen::CGBitFieldInfo::AccessInfo::AccessAlignment, clang::CodeGen::CGBitFieldInfo::AccessInfo::AccessWidth, Builder, CGM, ConvertType(), EmitCastToVoidPtr(), clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldBitStart, clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldByteOffset, clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldIndex, clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getBitFieldBaseAddr(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::CGBitFieldInfo::getComponent(), clang::CodeGen::CodeGenModule::getContext(), getLLVMContext(), clang::CodeGen::CGBitFieldInfo::getNumComponents(), clang::CharUnits::getQuantity(), clang::CodeGen::CGBitFieldInfo::getSize(), clang::ASTContext::getTargetAddressSpace(), clang::CodeGen::CodeGenModule::getTargetData(), clang::CodeGen::LValue::getType(), clang::CodeGen::CGBitFieldInfo::isSigned(), clang::CodeGen::LValue::isVolatileQualified(), clang::CharUnits::isZero(), clang::CodeGen::CGBitFieldInfo::AccessInfo::TargetBitOffset, and clang::CodeGen::CGBitFieldInfo::AccessInfo::TargetBitWidth.
Referenced by EmitLoadOfLValue().
Definition at line 1082 of file CGExpr.cpp.
References Builder, clang::CodeGen::RValue::get(), getAccessedFieldNo(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::VectorType::getNumElements(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::LValue::isVolatileQualified().
Referenced by EmitLoadOfLValue().
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 975 of file CGExpr.cpp.
References Builder, CGM, EmitARCLoadWeak(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfScalar(), 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::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), and clang::Qualifiers::OCL_Weak.
Referenced by EmitExprForReferenceBinding(), EmitRValueForField(), emitWritebackArg(), generateObjCGetterBody(), StartFunction(), and tryEmitARCRetainLoadOfScalar().
| llvm::Value * CodeGenFunction::EmitLoadOfScalar | ( | llvm::Value * | Addr, |
| bool | Volatile, | ||
| unsigned | Alignment, | ||
| QualType | Ty, | ||
| llvm::MDNode * | TBAAInfo = 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 905 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), EmitFromMemory(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::OptimizationLevel.
Referenced by ConvertTempToRValue(), EmitARCStoreStrong(), EmitCall(), EmitDelegateCallArg(), EmitFunctionProlog(), EmitLoadOfLValue(), EmitLoadOfScalar(), and EmitScalarInit().
| llvm::Value * CodeGenFunction::EmitLoadOfScalar | ( | LValue | lvalue | ) |
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 849 of file CGExpr.cpp.
References EmitLoadOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
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 634 of file CGExpr.cpp.
References EmitArraySubscriptExpr(), EmitBinaryOperatorLValue(), EmitCallExprLValue(), EmitCastLValue(), EmitComplexCompoundAssignmentLValue(), EmitCompoundAssignmentLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXTypeidLValue(), EmitDeclRefLValue(), EmitExtVectorElementExpr(), EmitInitListLValue(), EmitLambdaLValue(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitNullInitializationLValue(), EmitObjCEncodeExprLValue(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), EmitOpaqueValueLValue(), EmitPredefinedLValue(), EmitPseudoObjectLValue(), EmitStmtExprLValue(), EmitStringLiteralLValue(), EmitUnaryOpLValue(), EmitUnsupportedLValue(), EmitVAArgExprLValue(), enterFullExpression(), getContext(), clang::Stmt::getStmtClass(), clang::ExprWithCleanups::getSubExpr(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitArraySubscriptExpr(), EmitAsmStmt(), EmitBinaryOperatorLValue(), EmitCallArg(), EmitCallExpr(), EmitCastLValue(), EmitCheckedLValue(), EmitConditionalOperatorLValue(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitExprForReferenceBinding(), EmitExtVectorElementExpr(), EmitIgnoredExpr(), EmitInitListLValue(), EmitMemberExpr(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitPointerToDataMemberBinaryExpr(), emitPseudoObjectExpr(), emitStructSetterCall(), EmitTypeidFromVTable(), EmitUnaryOpLValue(), EmitVAListRef(), and tryEmitARCRetainLoadOfScalar().
| LValue CodeGenFunction::EmitLValueForAnonRecordField | ( | llvm::Value * | BaseValue, |
| const IndirectFieldDecl * | Field, | ||
| unsigned | CVRQualifiers | ||
| ) |
EmitLValueForAnonRecordField - Given that the field is a member of an anonymous struct or union buried inside a record, and given that the base value is a pointer to the enclosing record, derive an lvalue for the ultimate field.
Definition at line 1983 of file CGExpr.cpp.
References clang::IndirectFieldDecl::chain_begin(), clang::IndirectFieldDecl::chain_end(), EmitLValueForField(), clang::CodeGen::LValue::getAddress(), getContext(), clang::ASTContext::getTypeDeclType(), clang::CodeGen::LValue::getVRQualifiers(), clang::CodeGen::LValue::isSimple(), and MakeAddrLValue().
Referenced by EmitMemberInitializer().
| LValue CodeGenFunction::EmitLValueForBitfield | ( | llvm::Value * | Base, |
| const FieldDecl * | Field, | ||
| unsigned | CVRQualifiers | ||
| ) |
Definition at line 1969 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::LValue::MakeBitfield(), and clang::QualType::withCVRQualifiers().
Referenced by EmitLValueForField().
Definition at line 2001 of file CGExpr.cpp.
References clang::Qualifiers::addCVRQualifiers(), Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenModule::DecorateInstruction(), EmitBitCastOfLValueToProperType(), EmitFieldAnnotations(), EmitLValueForBitfield(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAAInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::LValue::getVRQualifiers(), clang::Decl::hasAttr(), clang::FieldDecl::isBitField(), clang::TagDecl::isUnion(), clang::CharUnits::isZero(), MakeAddrLValue(), clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::LValue::setTBAAInfo(), clang::CodeGen::CodeGenModule::shouldUseTBAA(), clang::Qualifiers::Volatile, and clang::Qualifiers::Weak.
Referenced by EmitDeclRefLValue(), EmitExprForReferenceBinding(), EmitLValueForAnonRecordField(), EmitLValueForFieldInitialization(), EmitMemberExpr(), EmitRValueForField(), and StartFunction().
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 2082 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::CharUnits::isZero(), and MakeAddrLValue().
Referenced by EmitLambdaExpr(), and EmitMemberInitializer().
| LValue CodeGenFunction::EmitLValueForIvar | ( | QualType | ObjectTy, |
| llvm::Value * | Base, | ||
| const ObjCIvarDecl * | Ivar, | ||
| unsigned | CVRQualifiers | ||
| ) |
Definition at line 2573 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::EmitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 2350 of file CGExpr.cpp.
References EmitReferenceBindingToExpr(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
| void CodeGenFunction::EmitMCountInstrumentation | ( | ) |
EmitMCountInstrumentation - Emit call to .mcount.
Definition at line 246 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::TargetInfo::getMCountName(), Target, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by StartFunction().
| LValue CodeGenFunction::EmitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 1942 of file CGExpr.cpp.
References EmitFunctionDeclLValue(), EmitGlobalVarDeclLValue(), EmitLValue(), EmitLValueForField(), EmitScalarExpr(), clang::MemberExpr::getBase(), getContext(), clang::MemberExpr::getMemberDecl(), clang::Expr::getType(), clang::MemberExpr::isArrow(), MakeNaturalAlignAddrLValue(), and setObjCGCLValueClass().
Referenced by EmitLValue().
| Value * CodeGenFunction::EmitNeonCall | ( | llvm::Function * | F, |
| SmallVectorImpl< llvm::Value * > & | O, | ||
| const char * | name, | ||
| unsigned | shift = 0, |
||
| bool | rightshift = false |
||
| ) |
Definition at line 1415 of file CGBuiltin.cpp.
| Value * CodeGenFunction::EmitNeonShiftVector | ( | llvm::Value * | V, |
| llvm::Type * | Ty, | ||
| bool | negateForRightShift | ||
| ) |
Definition at line 1429 of file CGBuiltin.cpp.
| Value * CodeGenFunction::EmitNeonSplat | ( | llvm::Value * | V, |
| llvm::Constant * | Idx | ||
| ) |
Definition at line 1409 of file CGBuiltin.cpp.
| void CodeGenFunction::EmitNewArrayInitializer | ( | const CXXNewExpr * | E, |
| QualType | elementType, | ||
| llvm::Value * | NewPtr, | ||
| llvm::Value * | NumElements | ||
| ) |
Definition at line 791 of file CGExprCXX.cpp.
References Builder, createBasicBlock(), CreateTempAlloca(), DeactivateCleanupBlock(), EHStack, EmitBlock(), clang::CXXNewExpr::getAllocatedType(), getDestroyer(), clang::CXXNewExpr::getInitializer(), clang::CXXNewExpr::hasInitializer(), clang::QualType::isDestructedType(), needsEHCleanup(), pushIrregularPartialArrayCleanup(), pushRegularPartialArrayCleanup(), clang::CodeGen::EHScopeStack::stable_begin(), and StoreAnyExprIntoOneUnit().
Referenced by EmitNewInitializer().
| 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 738 of file CodeGenFunction.cpp.
References Builder, CGM, clang::frontend::CPlusPlus, emitNonZeroVLAInit(), clang::CodeGen::CodeGenModule::EmitNullConstant(), 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(), EmitNullInitializationLValue(), EmitObjCForCollectionStmt(), and EmitSynthesizedCXXCopyCtor().
| LValue CodeGenFunction::EmitNullInitializationLValue | ( | const CXXScalarValueInitExpr * | E | ) |
Definition at line 2337 of file CGExpr.cpp.
References CreateMemTemp(), EmitNullInitialization(), clang::CodeGen::LValue::getAddress(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
| llvm::Value * CodeGenFunction::EmitObjCArrayLiteral | ( | const ObjCArrayLiteral * | E | ) |
Definition at line 179 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCArrayLiteral::getArrayWithObjectsMethod().
| void CodeGenFunction::EmitObjCAtSynchronizedStmt | ( | const ObjCAtSynchronizedStmt & | S | ) |
Definition at line 1644 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 1640 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 1636 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 2246 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 (i8* ptr)
Definition at line 2149 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), clang::CodeGen::CodeGenModule::getRREntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::RREntrypoints::objc_autoreleasePoolPop.
| llvm::Value * CodeGenFunction::EmitObjCAutoreleasePoolPush | ( | ) |
Produce the code to do a objc_autoreleasepool_push. call i8* (void)
Definition at line 2133 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), 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 2709 of file CGObjC.cpp.
References clang::CompoundStmt::body_begin(), clang::CompoundStmt::body_end(), Builder, EHStack, clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitObjCAutoreleasePoolPush(), EmitObjCMRRAutoreleasePoolPush(), EmitStmt(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::CompoundStmt::getLBracLoc(), clang::CompoundStmt::getRBracLoc(), clang::ObjCAutoreleasePoolStmt::getSubStmt(), clang::CodeGen::NormalCleanup, clang::CodeGenOptions::ObjCRuntimeHasARC, 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 59 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), Args, Builder, CGM, ConvertType(), EmitAnyExpr(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::ObjCBoxedExpr::getBoxingMethod(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getResultType(), 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 88 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), Args, Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::LangAS::Count, CreateMemTemp(), EmitScalarInit(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::RValue::get(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getContext(), clang::ObjCArrayLiteral::getElement(), clang::ObjCObjectType::getInterface(), clang::ObjCDictionaryLiteral::getKeyValueElement(), clang::ObjCArrayLiteral::getNumElements(), clang::ObjCDictionaryLiteral::getNumElements(), clang::ASTContext::getObjCIdType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCObjectPointerType::getObjectType(), clang::ObjCMethodDecl::getResultType(), 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 1669 of file CGObjC.cpp.
References getARCCleanupKind().
Referenced by EmitARCExtendBlockObject(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), and EmitObjCForCollectionStmt().
| llvm::Value * CodeGenFunction::EmitObjCDictionaryLiteral | ( | const ObjCDictionaryLiteral * | E | ) |
Definition at line 183 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCDictionaryLiteral::getDictWithObjectsMethod().
| LValue CodeGenFunction::EmitObjCEncodeExprLValue | ( | const ObjCEncodeExpr * | E | ) |
Definition at line 1670 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitLValue().
| llvm::Value * CodeGenFunction::EmitObjCExtendObjectLifetime | ( | QualType | T, |
| llvm::Value * | Ptr | ||
| ) |
Definition at line 1677 of file CGObjC.cpp.
References EmitARCRetainAutorelease().
Referenced by EmitStoreThroughLValue().
| void CodeGenFunction::EmitObjCForCollectionStmt | ( | const ObjCForCollectionStmt & | S | ) |
Definition at line 1360 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RequiredArgs::All, Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), Builder, ConvertType(), clang::LangAS::Count, createBasicBlock(), 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(), getDebugInfo(), clang::ObjCForCollectionStmt::getElement(), clang::SourceRange::getEnd(), getJumpDestInCurrentScope(), getLangOpts(), clang::CodeGen::CodeGenModule::getObjCFastEnumerationStateType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), clang::ObjCForCollectionStmt::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 2783 of file CGExprScalar.cpp.
References Builder, ConvertType(), CreateMemTemp(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ObjCIsaExpr::getBase(), clang::Expr::getType(), clang::ObjCIsaExpr::isArrow(), and MakeNaturalAlignAddrLValue().
Referenced by EmitLValue().
| LValue CodeGenFunction::EmitObjCIvarRefLValue | ( | const ObjCIvarRefExpr * | E | ) |
Definition at line 2581 of file CGExpr.cpp.
References EmitLValue(), EmitLValueForIvar(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ObjCIvarRefExpr::getBase(), getContext(), clang::Qualifiers::getCVRQualifiers(), clang::ObjCIvarRefExpr::getDecl(), 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 268 of file CGObjC.cpp.
References AdjustRelatedResultType(), clang::ObjCMessageExpr::arg_begin(), clang::ObjCMessageExpr::arg_end(), Args, Builder, CGM, clang::ObjCMessageExpr::Class, CurCodeDecl, CurFuncDecl, EmitARCRetainAutorelease(), EmitARCRetainNonBlock(), EmitScalarExpr(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::CGObjCRuntime::GenerateMessageSendSuper(), 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::getResultType(), 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().
| LValue CodeGenFunction::EmitObjCMessageExprLValue | ( | const ObjCMessageExpr * | E | ) |
Definition at line 2549 of file CGExpr.cpp.
References EmitObjCMessageExpr(), clang::CodeGen::RValue::getAggregateAddr(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getResultType(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), 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 2197 of file CGObjC.cpp.
References Args, 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.
| llvm::Value * CodeGenFunction::EmitObjCMRRAutoreleasePoolPush | ( | ) |
Produce the code to do an MRR version objc_autoreleasepool_push. Which is: [[NSAutoreleasePool alloc] init]; Where alloc is declared as: + (id) alloc; in NSAutoreleasePool class. init is declared as: - (id) init; in its NSObject super class.
Definition at line 2172 of file CGObjC.cpp.
References Args, Builder, 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 1651 of file CGObjC.cpp.
References EmitARCRetain().
| llvm::Value * CodeGenFunction::EmitObjCProtocolExpr | ( | const ObjCProtocolExpr * | E | ) |
Definition at line 197 of file CGObjC.cpp.
References Builder, 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 189 of file CGObjC.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetSelector(), and clang::ObjCSelectorExpr::getSelector().
| LValue CodeGenFunction::EmitObjCSelectorLValue | ( | const ObjCSelectorExpr * | E | ) |
Definition at line 2562 of file CGExpr.cpp.
References Builder, 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 46 of file CGObjC.cpp.
References 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 2641 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitScalarExpr(), enterFullExpression(), and getLangOpts().
| LValue CodeGenFunction::EmitOpaqueValueLValue | ( | const OpaqueValueExpr * | e | ) |
Definition at line 2345 of file CGExpr.cpp.
References getOpaqueLValueMapping(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
Referenced by EmitExprForReferenceBinding(), and EmitLValue().
| void CodeGenFunction::EmitParmDecl | ( | const VarDecl & | D, |
| llvm::Value * | Arg, | ||
| unsigned | ArgNo | ||
| ) |
EmitParmDecl - Emit a ParmVarDecl or an ImplicitParamDecl.
Emit an alloca (or GlobalValue depending on target) for the specified parameter and set up LocalDeclMap.
Definition at line 1469 of file CGDecl.cpp.
References Arg, BlockInfo, Builder, CGM, ConvertTypeForMem(), CreateTempAlloca(), CurCodeDecl, clang::CodeGenOptions::DebugInfo, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitAutoVarWithLifetime(), EmitStoreOfScalar(), EmitVarAnnotations(), getARCCleanupKind(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::ObjCMethodDecl::getSelfDecl(), clang::ValueDecl::getType(), hasAggregateLLVMType(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), clang::VarDecl::isARCPseudoStrong(), clang::CodeGenOptions::LimitedDebugInfo, MakeAddrLValue(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, and clang::OMF_init.
Referenced by EmitFunctionProlog().
| LValue CodeGenFunction::EmitPointerToDataMemberBinaryExpr | ( | const BinaryOperator * | E | ) |
Definition at line 2660 of file CGExpr.cpp.
References clang::BO_PtrMemI, CGM, EmitLValue(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitScalarExpr(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue().
Definition at line 5038 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::CallExpr::getNumArgs().
| LValue CodeGenFunction::EmitPredefinedLValue | ( | const PredefinedExpr * | E | ) |
Definition at line 1676 of file CGExpr.cpp.
References CGM, clang::PredefinedExpr::ComputeName(), CurCodeDecl, CurFn, EmitUnsupportedLValue(), clang::PredefinedExpr::Func, clang::PredefinedExpr::Function, clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), getContext(), clang::PredefinedExpr::getIdentType(), clang::ASTContext::getTranslationUnitDecl(), clang::Expr::getType(), MakeAddrLValue(), and clang::PredefinedExpr::PrettyFunction.
Referenced by EmitLValue().
| LValue CodeGenFunction::EmitPseudoObjectLValue | ( | const PseudoObjectExpr * | e | ) |
Definition at line 3234 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 3229 of file CGExpr.cpp.
References emitPseudoObjectExpr().
| RValue CodeGenFunction::EmitReferenceBindingToExpr | ( | const Expr * | E, |
| const NamedDecl * | InitializedDecl | ||
| ) |
EmitReferenceBindingToExpr - Emits a reference binding to the passed in expression. Will emit a temporary variable if E is not an LValue.
Definition at line 447 of file CGExpr.cpp.
References CGM, destroyARCStrongImprecise, destroyARCStrongPrecise, destroyARCWeak, clang::Dtor_Complete, clang::CodeGen::EHCleanup, EmitExprForReferenceBinding(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfCXXDestructor(), getARCCleanupKind(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::QualType::getObjCLifetime(), clang::Decl::hasAttr(), clang::VarDecl::hasGlobalStorage(), clang::QualType::isNull(), clang::CodeGen::NormalAndEHCleanup, clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, pushDestroy(), PushDestructorCleanup(), and clang::CodeGen::CGCXXABI::registerGlobalDtor().
Referenced by EmitCallArg(), EmitCXXGlobalVarDeclInit(), EmitExprAsInit(), EmitMaterializeTemporaryExpr(), and EmitReturnStmt().
| void CodeGenFunction::EmitReturnBlock | ( | ) |
EmitReturnBlock - Emit the unified return block, trying to avoid its emission when possible.
Definition at line 106 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 742 of file CGStmt.cpp.
References Builder, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitAnyExpr(), EmitBranchThroughCleanup(), EmitComplexExprIntoAddr(), EmitReferenceBindingToExpr(), EmitScalarExpr(), FnRetTy, clang::CodeGen::AggValueSlot::forAddr(), getContext(), clang::ReturnStmt::getNRVOCandidate(), clang::ReturnStmt::getRetValue(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), hasAggregateLLVMType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::VarDecl::isNRVOVariable(), NRVOFlags, ReturnBlock, ReturnValue, Target, and clang::TargetInfo::useGlobalsForAutomaticVariables().
Referenced by EmitStmt(), and generateObjCGetterBody().
Definition at line 2356 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), EmitLoadOfLValue(), EmitLValueForField(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getComplex(), clang::ValueDecl::getType(), hasAggregateLLVMType(), clang::CodeGen::LValue::isVolatileQualified(), and LoadComplexFromAddr().
| 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 2757 of file CGExprScalar.cpp.
References hasAggregateLLVMType().
Referenced by EvaluateExprAsBool().
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 2742 of file CGExprScalar.cpp.
References disableDebugInfo(), enableDebugInfo(), clang::Expr::getType(), and hasAggregateLLVMType().
Referenced by EmitAnyExpr(), EmitAnyExprToMem(), EmitARCExtendBlockObject(), emitARCRetainCall(), EmitArraySubscriptExpr(), EmitAtomicExpr(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitCallExpr(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXDeleteExpr(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitDeclInit(), EmitExtVectorElementExpr(), EmitIndirectGotoStmt(), EmitInitializerForField(), EmitMemberExpr(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitPointerToDataMemberBinaryExpr(), EmitReturnStmt(), EmitScalarInit(), EmitStoreThroughLValue(), EmitSwitchStmt(), EmitUnaryOpLValue(), EmitVAListRef(), EmitVariablyModifiedType(), emitWritebackArg(), EvaluateExprAsBool(), tryEmitARCRetainLoadOfScalar(), and tryEmitARCRetainScalarExpr().
| void CodeGenFunction::EmitScalarInit | ( | const Expr * | init, |
| const ValueDecl * | D, | ||
| LValue | lvalue, | ||
| bool | capturedByInit | ||
| ) |
Definition at line 516 of file CGDecl.cpp.
References Builder, drillIntoBlockVariable(), EmitARCInitWeak(), EmitARCRelease(), EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitARCStoreWeak(), EmitLoadOfScalar(), EmitScalarExpr(), EmitStoreOfScalar(), EmitStoreThroughLValue(), enterFullExpression(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getByRefValueLLVMField(), 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(), EmitAtomicExpr(), EmitDeclInit(), EmitExprAsInit(), EmitExprForReferenceBinding(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), and StoreAnyExprIntoOneUnit().
| void CodeGenFunction::EmitScalarInit | ( | llvm::Value * | init, |
| LValue | lvalue | ||
| ) |
EmitScalarInit - Initialize the given lvalue with the given object.
Definition at line 621 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 2778 of file CGExprScalar.cpp.
Referenced by EmitUnaryOpLValue().
| 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 170 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 472 of file CGException.cpp.
References CGM, EHStack, clang::EST_Dynamic, clang::EST_DynamicNone, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), 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 271 of file CGDecl.cpp.
References clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenModule::AddUsedGlobal(), CGM, CreateStaticVarDecl(), clang::CodeGenOptions::DebugInfo, clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), EmitVariablyModifiedType(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getStaticLocalDeclAddress(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CodeGenOptions::LimitedDebugInfo, clang::CodeGen::CGDebugInfo::setLocation(), and clang::CodeGen::CodeGenModule::setStaticLocalDeclAddress().
Referenced by EmitAutoVarAlloca(), EmitVarDecl(), and clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl().
| void CodeGenFunction::EmitStdInitializerListCleanup | ( | llvm::Value * | loc, |
| const InitListExpr * | init | ||
| ) |
Definition at line 1323 of file CGExprAgg.cpp.
References Builder, ConvertType(), EmitRecursiveStdInitializerListCleanup(), clang::ASTContext::getConstantArrayType(), getContext(), clang::InitListExpr::getNumInits(), clang::ASTContext::getPointerType(), clang::ASTContext::getSizeType(), GetStdInitializerListElementType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), and clang::ArrayType::Normal.
Referenced by EmitRecursiveStdInitializerListCleanup(), and MaybeEmitStdInitializerListCleanup().
| 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 43 of file CGStmt.cpp.
References Builder, ContainsLabel(), EmitAsmStmt(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDoStmt(), EmitForStmt(), EmitIfStmt(), EmitIgnoredExpr(), EmitIndirectGotoStmt(), EmitObjCAtSynchronizedStmt(), EmitObjCAtThrowStmt(), EmitObjCAtTryStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitReturnStmt(), EmitSimpleStmt(), EmitStopPoint(), EmitSwitchStmt(), EmitWhileStmt(), EnsureInsertPoint(), clang::Stmt::getStmtClass(), HaveInsertPoint(), and clang::Stmt::NoStmtClass.
Referenced by clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAttributedStmt(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCompoundStmt(), EmitConstructorBody(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDefaultStmt(), EmitDestructorBody(), EmitDoStmt(), EmitForStmt(), EmitFunctionBody(), EmitIfStmt(), EmitLabelStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitSwitchStmt(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), ExitCXXTryStmt(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCMethod(), and generateObjCSetterBody().
Definition at line 2606 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 32 of file CGStmt.cpp.
References Builder, getDebugInfo(), clang::Stmt::getLocEnd(), and clang::Stmt::getLocStart().
Referenced by EmitBreakStmt(), EmitContinueStmt(), EmitDeclStmt(), EmitGotoStmt(), and EmitStmt().
| void CodeGenFunction::EmitStoreOfScalar | ( | llvm::Value * | Value, |
| llvm::Value * | Addr, | ||
| bool | Volatile, | ||
| unsigned | Alignment, | ||
| QualType | Ty, | ||
| llvm::MDNode * | TBAAInfo = 0, |
||
| 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.
Definition at line 949 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), and EmitToMemory().
Referenced by EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitAtomicExpr(), EmitAtomicOp(), EmitCall(), EmitCXXGlobalVarDeclInit(), EmitExprForReferenceBinding(), EmitFunctionEpilog(), EmitParmDecl(), EmitScalarInit(), EmitStoreOfScalar(), EmitStoreThroughLValue(), 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 965 of file CGExpr.cpp.
References EmitStoreOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
| void CodeGenFunction::EmitStoreThroughBitfieldLValue | ( | RValue | Src, |
| LValue | Dst, | ||
| llvm::Value ** | Result = 0 |
||
| ) |
EmitStoreThroughLValue - 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 1204 of file CGExpr.cpp.
References clang::CodeGen::CGBitFieldInfo::AccessInfo::AccessAlignment, clang::CodeGen::CGBitFieldInfo::AccessInfo::AccessWidth, Builder, CGM, ConvertTypeForMem(), EmitCastToVoidPtr(), clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldBitStart, clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldByteOffset, clang::CodeGen::CGBitFieldInfo::AccessInfo::FieldIndex, clang::CodeGen::LValue::getBitFieldBaseAddr(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::CGBitFieldInfo::getComponent(), getLLVMContext(), clang::CodeGen::CGBitFieldInfo::getNumComponents(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CGBitFieldInfo::getSize(), clang::CodeGen::CodeGenModule::getTargetData(), clang::CodeGen::LValue::getType(), hasBooleanRepresentation(), clang::CodeGen::CGBitFieldInfo::isSigned(), clang::CodeGen::LValue::isVolatileQualified(), clang::CharUnits::isZero(), clang::CodeGen::CGBitFieldInfo::AccessInfo::TargetBitOffset, and clang::CodeGen::CGBitFieldInfo::AccessInfo::TargetBitWidth.
Referenced by EmitStoreThroughLValue().
Definition at line 1309 of file CGExpr.cpp.
References Builder, getAccessedFieldNo(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getExtVectorAddr(), clang::CodeGen::LValue::getExtVectorElts(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::LValue::isVolatileQualified().
Referenced by EmitStoreThroughLValue().
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 1117 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(), 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::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(), EmitBinaryOperatorLValue(), EmitExprAsInit(), EmitExprForReferenceBinding(), EmitInitializerForField(), EmitObjCForCollectionStmt(), EmitScalarInit(), and emitWriteback().
| LValue CodeGenFunction::EmitStringLiteralLValue | ( | const StringLiteral * | E | ) |
Definition at line 1665 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 1157 of file CGStmt.cpp.
References Builder, ConstantFoldsToSimpleInteger(), createBasicBlock(), 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(), getJumpDestInCurrentScope(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
Referenced by EmitStmt().
| void CodeGenFunction::EmitSynthesizedCXXCopyCtor | ( | llvm::Value * | Dest, |
| llvm::Value * | Src, | ||
| const Expr * | Exp | ||
| ) |
Definition at line 471 of file CGExprCXX.cpp.
References clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), 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, | ||
| CallExpr::const_arg_iterator | ArgBeg, | ||
| CallExpr::const_arg_iterator | ArgEnd | ||
| ) |
Definition at line 1265 of file CGClass.cpp.
References Arg, Args, clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::Ctor_Complete, EmitAggregateCopy(), EmitCall(), EmitCallArg(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(), getContext(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::CXXMethodDecl::isInstance(), and clang::FunctionDecl::isTrivial().
Referenced by EmitCXXMemberCallExpr(), and EmitSynthesizedCXXCopyCtor().
EmitTargetBuiltinExpr - Emit the given builtin call. Returns 0 if the call is unhandled by the current target.
Definition at line 1369 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 926 of file CGExpr.cpp.
References Builder, and hasBooleanRepresentation().
Referenced by EmitStoreOfScalar(), and EmitToInt().
| LValue CodeGenFunction::EmitUnaryOpLValue | ( | const UnaryOperator * | E | ) |
Definition at line 1604 of file CGExpr.cpp.
References Addr, Builder, EmitComplexPrePostIncDec(), EmitLValue(), EmitScalarExpr(), EmitScalarPrePostIncDec(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::ASTContext::getCanonicalType(), getContext(), getElementType(), clang::ASTContext::getLangOpts(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), 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().
EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
Definition at line 604 of file CGExpr.cpp.
References ConvertType(), ErrorUnsupported(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by EmitCastLValue(), EmitConditionalOperatorLValue(), EmitLValue(), and EmitPredefinedLValue().
EmitUnsupportedRValue - Emit a dummy r-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
Definition at line 598 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 2199 of file CGCall.cpp.
References CGM, clang::ABIInfo::EmitVAArg(), clang::CodeGen::CodeGenTypes::getABIInfo(), and clang::CodeGen::CodeGenModule::getTypes().
Definition at line 2515 of file CGExpr.cpp.
References EmitAggExprToLValue().
Referenced by EmitLValue().
| llvm::Value * CodeGenFunction::EmitVAListRef | ( | const Expr * | E | ) |
Definition at line 1080 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 1134 of file CodeGenFunction.cpp.
References Builder, CGM, EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Decl::specific_attr_begin(), and clang::Decl::specific_attr_end().
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 109 of file CGDecl.cpp.
References CGM, clang::frontend::CPlusPlus, CurFn, EmitAutoVarDecl(), EmitStaticVarDecl(), clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl(), getContext(), getLangOpts(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::VarDecl::getStorageClass(), clang::InternalLinkage, clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_OpenCLWorkGroupLocal, clang::SC_PrivateExtern, clang::SC_Register, and clang::SC_Static.
Referenced by EmitDecl().
| void CodeGenFunction::EmitVariablyModifiedType | ( | QualType | Ty | ) |
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 968 of file CodeGenFunction.cpp.
References Builder, EmitIgnoredExpr(), EmitScalarExpr(), EnsureInsertPoint(), getContext(), clang::ArrayType::getElementType(), getElementType(), clang::QualType::getSingleStepDesugaredType(), clang::VariableArrayType::getSizeExpr(), clang::QualType::getTypePtr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitAutoVarAlloca(), EmitDecl(), EmitStaticVarDecl(), and StartFunction().
| void CodeGenFunction::EmitWhileStmt | ( | const WhileStmt & | S | ) |
Definition at line 441 of file CGStmt.cpp.
References Builder, createBasicBlock(), EmitAutoVarDecl(), EmitBlock(), EmitBranch(), EmitBranchThroughCleanup(), EmitStmt(), EvaluateExprAsBool(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::WhileStmt::getBody(), clang::WhileStmt::getCond(), clang::WhileStmt::getConditionVariable(), getJumpDestInCurrentScope(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), and SimplifyForwardingBlocks().
Referenced by EmitStmt().
Definition at line 2248 of file CGBuiltin.cpp.
References clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), Index, and clang::Expr::isIntegerConstantExpr().
| void clang::CodeGen::CodeGenFunction::enableDebugInfo | ( | ) | [inline] |
Definition at line 1212 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 1549 of file CodeGenFunction.h.
References createBasicBlock(), EmitBlock(), and HaveInsertPoint().
Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitCall(), EmitCompoundStmt(), 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 1989 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 569 of file CGException.cpp.
References CGM, createBasicBlock(), EHStack, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CXXCatchStmt::getCaughtType(), clang::CodeGen::CGObjCRuntime::GetEHType(), clang::CXXCatchStmt::getExceptionDecl(), clang::CXXTryStmt::getHandler(), clang::QualType::getNonReferenceType(), clang::CXXTryStmt::getNumHandlers(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::QualType::getUnqualifiedType(), clang::CodeGen::EHScopeStack::pushCatch(), clang::CodeGen::EHCatchScope::setCatchAllHandler(), and clang::CodeGen::EHCatchScope::setHandler().
Referenced by EmitConstructorBody(), EmitCXXTryStmt(), and EmitDestructorBody().
| void CodeGenFunction::EnterDtorCleanups | ( | const CXXDestructorDecl * | DD, |
| CXXDtorType | DtorType | ||
| ) |
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.
EmitDtorEpilogue - 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.
Definition at line 999 of file CGClass.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::EHCleanup, EHStack, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), getCleanupKind(), clang::RecordType::getDecl(), getDestroyer(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::CXXBaseSpecifier::getType(), clang::ValueDecl::getType(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::QualType::isDestructedType(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CXXBaseSpecifier::isVirtual(), clang::CodeGen::NormalAndEHCleanup, clang::CXXRecordDecl::vbases_begin(), and clang::CXXRecordDecl::vbases_end().
Referenced by EmitDestructorBody().
| void clang::CodeGen::CodeGenFunction::enterFullExpression | ( | const ExprWithCleanups * | E | ) | [inline] |
Definition at line 2454 of file CodeGenFunction.h.
References enterNonTrivialFullExpression(), and clang::ExprWithCleanups::getNumObjects().
Referenced by EmitExprForReferenceBinding(), EmitLValue(), EmitObjCThrowOperand(), EmitScalarInit(), and tryEmitARCRetainScalarExpr().
| 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 573 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, | ||
| bool | OmitOnError = false |
||
| ) |
ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.
Definition at line 682 of file CodeGenFunction.cpp.
References CGM, and clang::CodeGen::CodeGenModule::ErrorUnsupported().
Referenced by EmitStdInitializerListCleanup(), 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 84 of file CGExpr.cpp.
References clang::ASTContext::BoolTy, CGM, EmitComplexExpr(), EmitComplexToScalarConversion(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitScalarConversion(), EmitScalarExpr(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::Expr::getType().
Referenced by EmitBranchOnBoolExpr(), EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), and EmitWhileStmt().
| void CodeGenFunction::ExitCXXTryStmt | ( | const CXXTryStmt & | S, |
| bool | IsFnTryBlock = false |
||
| ) |
Definition at line 1220 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::begin(), clang::CodeGen::EHScopeStack::begin(), BeginCatch(), Builder, createBasicBlock(), CurCodeDecl, EHStack, EmitBlock(), EmitBlockAfterUses(), emitCatchDispatchBlock(), EmitStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CXXTryStmt::getHandler(), clang::CXXCatchStmt::getHandlerBlock(), clang::CXXTryStmt::getNumHandlers(), clang::CodeGen::EHCatchScope::getNumHandlers(), clang::CodeGen::EHScope::hasEHBranches(), HaveInsertPoint(), clang::CodeGen::NormalCleanup, 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 155 of file CodeGenFunction.cpp.
References AllocaInsertPt, Builder, CGM, CurCodeDecl, CurFnInfo, EHResumeBlock, EHStack, EmitBlock(), clang::CodeGenOptions::EmitDeclMetadata, EmitEndEHSpec(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitIfUsed(), EmitReturnBlock(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), PopCleanupBlocks(), PrologueCleanupDepth, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), GenerateObjCSetter(), and GenerateThunk().
| llvm::Function * CodeGenFunction::GenerateBlockFunction | ( | GlobalDecl | GD, |
| const CGBlockInfo & | Info, | ||
| const Decl * | OuterFuncDecl, | ||
| const DeclMapTy & | ldm, | ||
| bool | IsLambdaConversionToBlock | ||
| ) |
Definition at line 996 of file CGBlocks.cpp.
References clang::BlockDecl::capture_begin(), clang::BlockDecl::capture_end(), clang::CodeGen::CGBlockInfo::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::CodeGen::CGBlockInfo::Capture::getIndex(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::CharUnits::getQuantity(), clang::FunctionType::getResultType(), clang::MangleBuffer::getString(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::InternalLinkage, clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::FunctionProtoType::isVariadic(), clang::CodeGenOptions::LimitedDebugInfo, clang::BlockDecl::param_begin(), clang::BlockDecl::param_end(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::CGBlockInfo::UsesStret, and clang::ASTContext::VoidPtrTy.
Referenced by EmitBlockLiteral(), and clang::CodeGen::CodeGenModule::GetAddrOfGlobalBlock().
| void CodeGenFunction::GenerateCode | ( | GlobalDecl | GD, |
| llvm::Function * | Fn, | ||
| const CGFunctionInfo & | FnInfo | ||
| ) |
Definition at line 422 of file CodeGenFunction.cpp.
References Args, clang::CodeGen::CGCXXABI::BuildInstanceFunctionParams(), CGM, clang::CodeGenOptions::CUDAIsDevice, CurFn, CurGD, EmitConstructorBody(), EmitDestructorBody(), clang::CodeGen::CGCUDARuntime::EmitDeviceStubBody(), EmitFunctionBody(), EmitLambdaStaticInvokeFunction(), EmitLambdaToBlockPointerBody(), FinishFunction(), clang::SourceRange::getBegin(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCUDARuntime(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::SourceRange::getEnd(), clang::ASTContext::getLangOpts(), clang::CodeGen::CodeGenModule::getModuleDebugInfo(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getResultType(), clang::Decl::hasAttr(), StartFunction(), and TryMarkNoThrow().
| llvm::Constant * CodeGenFunction::GenerateCopyHelperFunction | ( | const CGBlockInfo & | blockInfo | ) |
Definition at line 1183 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, clang::BlockDecl::capture_begin(), clang::BlockDecl::capture_end(), clang::FunctionDecl::Create(), 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::Qualifiers::hasStrongOrWeakObjCLifetime(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::InternalLinkage, clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCWeak(), clang::Qualifiers::OCL_Weak, clang::SC_None, clang::SC_Static, clang::CodeGen::CGBlockInfo::StructureType, 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 363 of file CGDeclCXX.cpp.
References Builder, FinishFunction(), getContext(), getTypes(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
| void CodeGenFunction::GenerateCXXGlobalInitFunc | ( | llvm::Function * | Fn, |
| llvm::Constant ** | Decls, | ||
| unsigned | NumDecls | ||
| ) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
Definition at line 338 of file CGDeclCXX.cpp.
References Builder, clang::frontend::CPlusPlus, EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPush(), 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 317 of file CGDeclCXX.cpp.
References EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), FinishFunction(), getContext(), getTypes(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
| llvm::Function * CodeGenFunction::generateDestroyHelper | ( | llvm::Constant * | addr, |
| QualType | type, | ||
| Destroyer * | destroyer, | ||
| bool | useEHCleanupForArray | ||
| ) |
generateDestroyHelper - Generates a helper function which, when invoked, destroys the given object.
Definition at line 386 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), CGM, CreateGlobalInitOrDestructFunction(), emitDestroy(), FinishFunction(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitDeclDestroy().
| llvm::Constant * CodeGenFunction::GenerateDestroyHelperFunction | ( | const CGBlockInfo & | blockInfo | ) |
Definition at line 1302 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, clang::BlockDecl::capture_begin(), clang::BlockDecl::capture_end(), clang::FunctionDecl::Create(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), 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::CodeGen::CGBlockInfo::Capture::isConstant(), clang::QualType::isObjCGCWeak(), clang::Qualifiers::OCL_Weak, clang::SC_None, clang::SC_Static, clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by buildDisposeHelper().
| llvm::Constant * CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction | ( | const ObjCPropertyImplDecl * | PID | ) |
Definition at line 2841 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), 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::CodeGen::CodeGenModule::getModuleDebugInfo(), 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(), hasTrivialGetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::SC_None, 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 2757 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::RequiredArgs::All, Args, clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), 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::CodeGen::CodeGenModule::getModuleDebugInfo(), 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(), hasTrivialSetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::SC_None, 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 1293 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::CXXCtorInitializer::getAnyMember(), clang::ObjCImplDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getContext(), clang::CXXCtorInitializer::getInit(), clang::ObjCMethodDecl::getLocStart(), clang::ASTContext::getObjCIdType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCImplementationDecl::init_begin(), clang::ObjCImplementationDecl::init_end(), 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.
GenerateObjCGetter - Generate an Objective-C property getter function. The given Decl must be an ObjCImplementationDecl. is illegal within a category.
Definition at line 704 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, | ||
| llvm::Constant * | AtomicHelperFn | ||
| ) |
Definition at line 773 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(), EmitLoadOfLValue(), EmitLValueForIvar(), EmitReturnStmt(), emitStructGetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), 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::getResultType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::ObjCPropertyDecl::getType(), getTypes(), hasAggregateLLVMType(), hasTrivialGetExpr(), clang::CodeGen::LValue::isVolatileQualified(), LoadComplexFromAddr(), LoadObjCSelf(), clang::Qualifiers::OCL_Weak, ReturnValue, StoreComplexToAddr(), 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 478 of file CGObjC.cpp.
References EmitStmt(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::Decl::getBodyRBrace(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMethodDecl::getLocStart(), and StartObjCMethod().
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
| void CodeGenFunction::GenerateObjCSetter | ( | ObjCImplementationDecl * | IMP, |
| const ObjCPropertyImplDecl * | PID | ||
| ) |
GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.
GenerateObjCSetter - Generate an Objective-C property setter function. The given Decl must be an ObjCImplementationDecl. is illegal within a category.
Definition at line 1212 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 1037 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 303 of file CGVTables.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), clang::CodeGen::CodeGenTypes::arrangeFunctionCall(), clang::CodeGen::CodeGenTypes::arrangeGlobalDeclaration(), clang::CodeGen::CGCXXABI::BuildInstanceFunctionParams(), CGM, CurFnInfo, CurGD, EmitCall(), EmitDelegateCallArg(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), clang::CodeGen::CGCXXABI::EmitReturnFromThunk(), FinishFunction(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CGFunctionInfo::getCallingConvention(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getRegParm(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), hasAggregateLLVMType(), clang::ABIArgInfo::Indirect, clang::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::CodeGen::ReturnValueSlot::isNull(), LoadCXXThis(), clang::ThisAdjustment::NonVirtual, Param, clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), PerformReturnAdjustment(), PerformTypeAdjustment(), clang::ThunkInfo::Return, ReturnValue, clang::CodeGen::CodeGenModule::setFunctionLinkage(), setThunkVisibility(), similar(), StartFunction(), clang::ThunkInfo::This, and clang::ThisAdjustment::VCallOffsetOffset.
| void CodeGenFunction::GenerateVarArgsThunk | ( | llvm::Function * | Fn, |
| const CGFunctionInfo & | FnInfo, | ||
| GlobalDecl | GD, | ||
| const ThunkInfo & | Thunk | ||
| ) |
Definition at line 236 of file CGVTables.cpp.
References Builder, CGM, CurFn, clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), 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(), clang::ThisAdjustment::NonVirtual, PerformReturnAdjustment(), PerformTypeAdjustment(), clang::ThunkInfo::Return, clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), clang::ThunkInfo::This, and clang::ThisAdjustment::VCallOffsetOffset.
| 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 513 of file CGExpr.cpp.
Referenced by 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 | ||
| ) |
GetAddressOfBaseClass - This function will add the necessary delta to the load of 'this' and returns address of the base class.
Definition at line 135 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), Builder, ComputeNonVirtualBaseClassOffset(), ConvertType(), createBasicBlock(), EmitBlock(), clang::ASTContext::getASTRecordLayout(), getContext(), clang::ASTRecordLayout::getVBaseClassOffset(), GetVirtualBaseClassOffset(), and clang::CharUnits::isZero().
Referenced by EmitCastLValue(), and EmitExprForReferenceBinding().
| 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 218 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 78 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 891 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::NamedDecl::getNameAsString(), clang::ValueDecl::getType(), and clang::CodeGen::CGBlockInfo::Capture::isConstant().
Referenced by EmitDeclRefLValue(), and EmitLambdaBlockInvokeBody().
| llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel | ( | const LabelDecl * | L | ) |
Definition at line 818 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 1663 of file CodeGenFunction.h.
Referenced by EmitAggMemberInitializer(), EmitDelegateCallArg(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitThisParam(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GetAddrOfStaticLocalVar(), and tryRemoveRetainOfSelf().
| llvm::Constant* clang::CodeGen::CodeGenFunction::GetAddrOfStaticLocalVar | ( | const VarDecl * | BVD | ) | [inline] |
GetAddrOfStaticLocalVar - Return the address of a static local variable.
Definition at line 1658 of file CodeGenFunction.h.
References GetAddrOfLocalVar().
| CleanupKind clang::CodeGen::CodeGenFunction::getARCCleanupKind | ( | ) | [inline] |
Retrieves the default cleanup kind for an ARC cleanup. Except under -fobjc-arc-eh, ARC cleanups are normal-only.
Definition at line 2284 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::NormalAndEHCleanup, clang::CodeGen::NormalCleanup, and clang::CodeGenOptions::ObjCAutoRefCountExceptions.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitExprForReferenceBinding(), EmitObjCConsumeObject(), EmitParmDecl(), EmitReferenceBindingToExpr(), 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 1807 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 1294 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 1205 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getContext().
Referenced by AddInitializerToStaticVarDecl(), AdjustRelatedResultType(), ApplyNonVirtualAndVirtualOffset(), CheckAggExprForMemSetUse(), CodeGenFunction(), ConstantFoldsToSimpleInteger(), ConvertType(), CreateAggTemp(), CreateIRTemp(), CreateMemTemp(), CreateStaticVarDecl(), EmitAggMemberInitializer(), EmitAggregateCopy(), EmitAnyExprToMem(), emitArrayLength(), EmitArraySubscriptExpr(), EmitAsmStmt(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitBlockCopyAndAutorelease(), EmitCall(), EmitCallArg(), EmitCallExpr(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastLValue(), EmitCheckedLValue(), EmitComplexPrePostIncDec(), EmitCompoundStmt(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXDeleteExpr(), EmitCXXDestructorCall(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCall(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXOperatorMemberCallee(), EmitCXXThrowExpr(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDeleteCall(), emitDestroy(), EmitDestructorBody(), EmitDynamicCastCall(), EmitEndEHSpec(), EmitExprForReferenceBinding(), EmitForwardingCallToLambda(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitInitializerForField(), EmitLambdaBlockInvokeBody(), EmitLambdaDelegatingInvokeBody(), EmitLValue(), EmitLValueForAnonRecordField(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMemberExpr(), EmitMemberInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCForCollectionStmt(), EmitObjCIvarRefLValue(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitPredefinedLValue(), EmitReturnStmt(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStdInitializerListCleanup(), EmitStoreThroughLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtor(), EmitSynthesizedCXXCopyCtorCall(), EmitUnaryOpLValue(), EmitVAArgFromMemory(), EmitVAListRef(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarDecl(), EmitVariablyModifiedType(), EmitZeroMemSet(), ErrorUnsupportedABI(), EvaluateExprAsBool(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateThunk(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getDynamicCastFn(), GetNumNonZeroBytesInInit(), GetStaticDeclName(), GetVirtualBaseClassOffset(), getVLASize(), GetVTTParameter(), InitCatchParam(), InitializeVTablePointers(), isCheapEnoughToEvaluateUnconditionally(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), PerformTypeAdjustment(), StartFunction(), StoreAnyExprIntoOneUnit(), tryEmitAsConstant(), and TypeOfSelfObject().
| CGDebugInfo* clang::CodeGen::CodeGenFunction::getDebugInfo | ( | ) | [inline] |
Definition at line 1206 of file CodeGenFunction.h.
References NULL.
Referenced by EmitAutoVarAlloca(), EmitCallExpr(), EmitConstructorBody(), EmitCXXConstructorCall(), EmitCXXForRangeStmt(), EmitCXXMemberCallExpr(), EmitDeclRefExprDbgValue(), EmitForStmt(), EmitIfStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitParmDecl(), EmitStaticVarDecl(), EmitStopPoint(), FinishFunction(), clang::CodeGen::CodeGenFunction::LexicalScope::ForceCleanup(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), StartFunction(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
| CodeGenFunction::Destroyer * CodeGenFunction::getDestroyer | ( | QualType::DestructionKind | destructionKind | ) |
Definition at line 1212 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(), EmitStdInitializerListCleanup(), enterBlockScope(), EnterDtorCleanups(), and pushDestroy().
| llvm::BasicBlock * CodeGenFunction::getEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 601 of file CGException.cpp.
References 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::EHScope::setCachedEHDispatchBlock(), clang::CodeGen::EHScopeStack::stable_end(), and clang::CodeGen::EHScope::Terminate.
Referenced by emitCatchDispatchBlock(), and EmitLandingPad().
| llvm::BasicBlock * CodeGenFunction::getEHResumeBlock | ( | ) |
Definition at line 1535 of file CGException.cpp.
References Builder, CGM, CHL_Ideal, CHL_MandatoryCatchall, CHL_MandatoryCleanup, CleanupHackLevel, createBasicBlock(), EHResumeBlock, getCatchallRethrowFn(), getExceptionFromSlot(), clang::CodeGen::CodeGenModule::getLangOpts(), getSelectorFromSlot(), getUnwindResumeFn(), getUnwindResumeOrRethrowFn(), and NULL.
Referenced by emitFilterDispatchBlock(), and getEHDispatchBlock().
| llvm::Value * CodeGenFunction::getEHSelectorSlot | ( | ) |
Definition at line 389 of file CGException.cpp.
References CreateTempAlloca(), EHSelectorSlot, and clang::CodeGen::CodeGenTypeCache::Int32Ty.
Referenced by EmitLandingPad(), and getSelectorFromSlot().
| llvm::Value * CodeGenFunction::getExceptionFromSlot | ( | ) |
Returns the contents of the function's exception object and selector slots.
Definition at line 395 of file CGException.cpp.
References Builder, and getExceptionSlot().
Referenced by BeginCatch(), emitFilterDispatchBlock(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getEHResumeBlock(), and InitCatchParam().
| llvm::Value * CodeGenFunction::getExceptionSlot | ( | ) |
Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.
Definition at line 383 of file CGException.cpp.
References CreateTempAlloca(), ExceptionSlot, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitLandingPad(), and getExceptionFromSlot().
| llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock | ( | ) |
Definition at line 830 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 1240 of file CodeGenFunction.h.
References EHStack, getInvokeDestImpl(), and clang::CodeGen::EHScopeStack::requiresLandingPad().
Referenced by EmitCall(), EmitCallOrInvoke(), and EmitCXXThrowExpr().
| llvm::BasicBlock * CodeGenFunction::getInvokeDestImpl | ( | ) |
Definition at line 660 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), CGM, EHStack, EmitLandingPad(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenModule::getLangOpts(), isNonEHScope(), and clang::CodeGen::EHScopeStack::requiresLandingPad().
Referenced by getInvokeDest().
| CodeGenFunction::JumpDest CodeGenFunction::getJumpDestForLabel | ( | const LabelDecl * | S | ) |
getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
Definition at line 299 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 883 of file CodeGenFunction.h.
References EHStack, clang::CodeGen::EHScopeStack::getInnermostNormalCleanup(), and NextCleanupDestIndex.
Referenced by EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitLabel(), EmitObjCForCollectionStmt(), 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 892 of file CodeGenFunction.h.
References createBasicBlock(), and getJumpDestInCurrentScope().
| const LangOptions& clang::CodeGen::CodeGenFunction::getLangOpts | ( | ) | const [inline] |
Definition at line 1218 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by AddInitializerToStaticVarDecl(), EmitArraySubscriptExpr(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarCleanups(), EmitCallArg(), EmitCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberCallExpr(), EmitFunctionEpilog(), EmitLandingPad(), EmitNullInitialization(), EmitObjCForCollectionStmt(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitObjectDelete(), emitPointerArithmetic(), EmitVarDecl(), GenerateCXXGlobalInitFunc(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), getTerminateFn(), needsEHCleanup(), StartFunction(), and tryEmitARCRetainLoadOfScalar().
| llvm::LLVMContext& clang::CodeGen::CodeGenFunction::getLLVMContext | ( | ) | [inline] |
Definition at line 1245 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLLVMContext().
Referenced by createBasicBlock(), EmitAggregateCopy(), EmitARCRetainAutoreleasedReturnValue(), EmitAsmStmt(), EmitAtomicExpr(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitCastToVoidPtr(), EmitComplexPrePostIncDec(), EmitGlobalDeclMetadata(), EmitLoadOfBitfieldLValue(), EmitStoreThroughBitfieldLValue(), generateObjCGetterBody(), generateObjCSetterBody(), getAsmSrcLocInfo(), getUnreachableBlock(), SetFPAccuracy(), and StartFunction().
| llvm::Value * CodeGenFunction::getNormalCleanupDestSlot | ( | ) |
Definition at line 1090 of file CGCleanup.cpp.
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 1671 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 1682 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
| llvm::Value * CodeGenFunction::getSelectorFromSlot | ( | ) |
Definition at line 399 of file CGException.cpp.
References Builder, and getEHSelectorSlot().
Referenced by emitCatchDispatchBlock(), emitFilterDispatchBlock(), and getEHResumeBlock().
| 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 1514 of file CGException.cpp.
References Builder, createBasicBlock(), and getTerminateFn().
Referenced by getEHDispatchBlock().
| llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad | ( | ) |
getTerminateLandingPad - Return a landing pad that just calls terminate.
Definition at line 1486 of file CGException.cpp.
References Builder, CGM, createBasicBlock(), getCatchAllValue(), clang::CodeGen::CodeGenModule::getLangOpts(), getOpaquePersonalityFn(), getTerminateFn(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and NULL.
Referenced by EmitLandingPad().
| llvm::BasicBlock * CodeGenFunction::getTrapBB | ( | ) |
getTrapBB - Create a basic block that will call the trap intrinsic. We'll generate a branch around the created basic block as necessary.
Definition at line 1721 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), EmitBlock(), EmitBranch(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), HaveInsertPoint(), and clang::CodeGenOptions::OptimizationLevel.
Referenced by EmitCheck().
| CodeGenTypes& clang::CodeGen::CodeGenFunction::getTypes | ( | ) | const [inline] |
Definition at line 1204 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getTypes().
Referenced by EmitCall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitGlobalVarDeclLValue(), EmitLambdaDelegatingInvokeBody(), EmitObjectDelete(), emitStructGetterCall(), emitStructSetterCall(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateObjCGetterBody(), generateObjCSetterBody(), GetNumNonZeroBytesInInit(), and isSimpleZero().
GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
Definition at line 577 of file CGExpr.cpp.
References ConvertType(), CreateMemTemp(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getComplex(), and hasAggregateLLVMType().
Referenced by EmitCall(), and EmitUnsupportedRValue().
| llvm::BasicBlock* clang::CodeGen::CodeGenFunction::getUnreachableBlock | ( | ) | [inline] |
Definition at line 1232 of file CodeGenFunction.h.
References createBasicBlock(), and getLLVMContext().
Referenced by destroyOptimisticNormalEntry(), EmitCXXThrowExpr(), and clang::CodeGen::CodeGenFunction::FinallyInfo::enter().
| llvm::Constant * CodeGenFunction::getUnwindResumeFn | ( | ) |
Definition at line 99 of file CGException.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by getEHResumeBlock().
| llvm::Constant * CodeGenFunction::getUnwindResumeOrRethrowFn | ( | ) |
Definition at line 108 of file CGException.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by getEHResumeBlock().
| llvm::Value * CodeGenFunction::GetVirtualBaseClassOffset | ( | llvm::Value * | This, |
| const CXXRecordDecl * | ClassDecl, | ||
| const CXXRecordDecl * | BaseClassDecl | ||
| ) |
Definition at line 1447 of file CGClass.cpp.
References Builder, CGM, ConvertType(), getContext(), clang::CharUnits::getQuantity(), clang::VTableContext::getVirtualBaseOffsetOffset(), clang::CodeGen::CodeGenModule::getVTableContext(), GetVTablePtr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::PtrDiffTy.
Referenced by GetAddressOfBaseClass(), and InitializeVTablePointer().
| 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 946 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(), and getVLASize().
| std::pair< llvm::Value *, QualType > CodeGenFunction::getVLASize | ( | QualType | vla | ) |
Definition at line 939 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 1608 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::DecorateInstruction(), and clang::CodeGen::CodeGenModule::getTBAAInfoForVTablePtr().
Referenced by BuildVirtualCall(), EmitDynamicCastCall(), EmitTypeidFromVTable(), and GetVirtualBaseClassOffset().
| bool CodeGenFunction::hasAggregateLLVMType | ( | QualType | T | ) | [static] |
hasAggregateLLVMType - Return true if the specified AST type will map into an aggregate LLVM type or is void.
Definition at line 65 of file CodeGenFunction.cpp.
References clang::QualType::getCanonicalType(), and clang::AtomicType::getValueType().
Referenced by ConvertTempToRValue(), EmitAggExpr(), EmitAggExprToLValue(), EmitAggMemberInitializer(), EmitAnyExpr(), EmitAnyExprToMem(), EmitAnyExprToTemp(), EmitAsmStmt(), EmitAtomicExpr(), EmitBinaryOperatorLValue(), EmitCall(), EmitCallArg(), EmitComplexToScalarConversion(), EmitConditionalOperatorLValue(), EmitDeclInit(), EmitDelegateCallArg(), EmitExprAsInit(), EmitExprForReferenceBinding(), EmitForwardingCallToLambda(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitInitializerForField(), EmitParmDecl(), emitPseudoObjectExpr(), EmitReturnStmt(), EmitRValueForField(), EmitScalarConversion(), EmitScalarExpr(), generateObjCGetterBody(), GenerateThunk(), GetUndefRValue(), InitCatchParam(), isAggregateTypeForABI(), StartFunction(), and StoreAnyExprIntoOneUnit().
| 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 1541 of file CodeGenFunction.h.
References Builder.
Referenced by EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBreakStmt(), EmitCleanup(), EmitContinueStmt(), EmitDeclStmt(), EmitGotoStmt(), EmitStmt(), EnsureInsertPoint(), enterBlockScope(), ExitCXXTryStmt(), getTrapBB(), and protectFromPeepholes().
| bool CodeGenFunction::IndirectObjCSetterArg | ( | const CGFunctionInfo & | FI | ) |
Definition at line 1331 of file CGObjC.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::ABIArgInfo::getKind(), and clang::ABIArgInfo::Indirect.
| void CodeGenFunction::initFullExprCleanup | ( | ) |
Set up the last cleaup that was pushed as a conditional full-expression cleanup.
Definition at line 246 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(), and pushFullExprCleanup().
| void CodeGenFunction::InitializeVTablePointer | ( | BaseSubobject | Base, |
| const CXXRecordDecl * | NearestVBase, | ||
| CharUnits | OffsetFromNearestVBase, | ||
| llvm::Constant * | VTable, | ||
| const CXXRecordDecl * | VTableClass | ||
| ) |
InitializeVTablePointer - Initialize the vtable pointer of the given subobject.
Load the VTT.
Definition at line 1469 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), Builder, CGM, CurGD, clang::CodeGen::CodeGenModule::DecorateInstruction(), clang::VTableLayout::getAddressPoint(), clang::BaseSubobject::getBase(), clang::BaseSubobject::getBaseOffset(), clang::CXXRecordDecl::getNumVBases(), clang::CodeGen::CodeGenVTables::getSecondaryVirtualPointerIndex(), clang::CodeGen::CodeGenModule::getTBAAInfoForVTablePtr(), GetVirtualBaseClassOffset(), clang::CodeGen::CodeGenModule::getVTableContext(), clang::VTableContext::getVTableLayout(), clang::CodeGen::CodeGenModule::getVTables(), clang::CharUnits::isZero(), LoadCXXThis(), LoadCXXVTT(), clang::CodeGen::CodeGenVTables::needsVTTParameter(), and clang::CharUnits::Zero().
Referenced by InitializeVTablePointers().
| void CodeGenFunction::InitializeVTablePointers | ( | BaseSubobject | Base, |
| const CXXRecordDecl * | NearestVBase, | ||
| CharUnits | OffsetFromNearestVBase, | ||
| bool | BaseIsNonVirtualPrimaryBase, | ||
| llvm::Constant * | VTable, | ||
| const CXXRecordDecl * | VTableClass, | ||
| VisitedVirtualBasesSetTy & | VBases | ||
| ) |
Definition at line 1532 of file CGClass.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), 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 1591 of file CGClass.cpp.
References CGM, clang::CodeGen::CodeGenVTables::GetAddrOfVTable(), clang::CodeGen::CodeGenModule::getVTables(), 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 57 of file CGExpr.cpp.
References AllocaInsertPt.
| 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 943 of file CodeGenFunction.h.
Referenced by EnterNewDeleteCleanup(), pushFullExprCleanup(), 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 848 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().
Referenced by EmitCaseStmt().
| bool CodeGenFunction::IvarTypeWithAggrGCObjects | ( | QualType | Ty | ) |
Definition at line 1339 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 1361 of file CodeGenFunction.h.
References BlockPointer.
| ComplexPairTy CodeGenFunction::LoadComplexFromAddr | ( | llvm::Value * | SrcAddr, |
| bool | SrcIsVolatile | ||
| ) |
LoadComplexFromAddr - Load a complex number from the specified address.
Definition at line 813 of file CGExprComplex.cpp.
Referenced by ConvertTempToRValue(), EmitCall(), EmitComplexPrePostIncDec(), EmitDelegateCallArg(), EmitFunctionEpilog(), EmitRValueForField(), generateObjCGetterBody(), and InitCatchParam().
| 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 1730 of file CodeGenFunction.h.
Referenced by EmitBaseInitializer(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), EmitMemberInitializer(), GenerateThunk(), and InitializeVTablePointer().
| llvm::Value* clang::CodeGen::CodeGenFunction::LoadCXXVTT | ( | ) | [inline] |
LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
Definition at line 1737 of file CodeGenFunction.h.
Referenced by GetVTTParameter(), and InitializeVTablePointer().
| llvm::Value * CodeGenFunction::LoadObjCSelf | ( | ) |
LoadObjCSelf - Load the value of self. This function is only valid while generating code for an Objective-C method.
Definition at line 1347 of file CGObjC.cpp.
References Builder, CurFuncDecl, and clang::ObjCMethodDecl::getSelfDecl().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructMethod(), EmitObjCMessageExpr(), emitStructGetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
| LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue | ( | llvm::Value * | V, |
| QualType | T, | ||
| CharUnits | Alignment = CharUnits() |
||
| ) | [inline] |
Definition at line 1563 of file CodeGenFunction.h.
References CGM, getContext(), clang::CodeGen::CodeGenModule::getTBAAInfo(), and clang::CodeGen::LValue::MakeAddr().
Referenced by ConvertTempToRValue(), EmitAggExprToLValue(), EmitAnyExprToMem(), EmitArraySubscriptExpr(), EmitAtomicExpr(), EmitAtomicOp(), EmitAutoVarInit(), EmitCallExprLValue(), EmitCastLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXTypeidLValue(), EmitDeclInit(), EmitDeclRefLValue(), EmitExprForReferenceBinding(), EmitExtVectorElementExpr(), EmitFunctionDeclLValue(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitInitializerForField(), EmitLambdaExpr(), EmitLambdaLValue(), EmitLValueForAnonRecordField(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMaterializeTemporaryExpr(), EmitNullInitializationLValue(), EmitObjCEncodeExprLValue(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), EmitParmDecl(), EmitPointerToDataMemberBinaryExpr(), EmitPredefinedLValue(), emitPseudoObjectExpr(), EmitStmtExprLValue(), EmitStringLiteralLValue(), EmitUnaryOpLValue(), EmitUnsupportedLValue(), emitWriteback(), emitWritebackArg(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
| LValue clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue | ( | llvm::Value * | V, |
| QualType | T | ||
| ) | [inline] |
Definition at line 1568 of file CodeGenFunction.h.
References CGM, getContext(), clang::CodeGen::CodeGenModule::getTBAAInfo(), clang::ASTContext::getTypeAlignInChars(), and clang::CodeGen::LValue::MakeAddr().
Referenced by EmitArraySubscriptExpr(), EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), EmitMemberExpr(), EmitMemberInitializer(), EmitObjCIsaExpr(), EmitUnaryOpLValue(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), and StartFunction().
| void CodeGenFunction::MaybeEmitStdInitializerListCleanup | ( | llvm::Value * | loc, |
| const Expr * | init | ||
| ) |
Definition at line 1290 of file CGExprAgg.cpp.
References EmitStdInitializerListCleanup(), and clang::ExprWithCleanups::getSubExpr().
Referenced by EmitAggMemberInitializer(), EmitExprAsInit(), and StoreAnyExprIntoOneUnit().
| 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 1280 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(), getLangOpts(), and clang::CodeGenOptions::ObjCAutoRefCountExceptions.
Referenced by EmitArrayDelete(), EmitDeclDestroy(), EmitNewArrayInitializer(), enterBlockScope(), and getCleanupKind().
| 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 1213 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 | ) |
PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.
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.
Definition at line 529 of file CGCleanup.cpp.
References CreateNormalEntry(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, destroyOptimisticNormalEntry(), EmitCleanup(), 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(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
| void CodeGenFunction::PopCleanupBlocks | ( | EHScopeStack::stable_iterator | OldCleanupStackSize | ) |
Pops cleanup blocks until the given savepoint is reached.
PopCleanupBlocks - Takes the old cleanup stack size and emits the cleanup blocks that have been added.
Definition at line 368 of file CGCleanup.cpp.
References clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by EmitConstructorBody(), FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::~RunCleanupsScope().
| CodeGenFunction::PeepholeProtection CodeGenFunction::protectFromPeepholes | ( | RValue | rvalue | ) |
protectFromPeepholes - Protect a value that we're intending to store to the side, but which will probably be used later, from aggressive peepholing optimizations that might delete it.
Pass the result to unprotectFromPeepholes to declare that protection is no longer required.
There's no particular reason why this shouldn't apply to l-values, it's just that no existing peepholes work on pointers.
Definition at line 1095 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::pushDestroy | ( | QualType::DestructionKind | dtorKind, |
| llvm::Value * | addr, | ||
| QualType | type | ||
| ) |
pushDestroy - Push the standard destructor for the given type.
Definition at line 1226 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getCleanupKind(), and getDestroyer().
Referenced by EmitAutoVarWithLifetime(), EmitExprForReferenceBinding(), EmitReferenceBindingToExpr(), EmitStdInitializerListCleanup(), and enterBlockScope().
| void CodeGenFunction::pushDestroy | ( | CleanupKind | kind, |
| llvm::Value * | addr, | ||
| QualType | type, | ||
| Destroyer * | destroyer, | ||
| bool | useEHCleanupForArray | ||
| ) |
Definition at line 1235 of file CGDecl.cpp.
| 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 1436 of file CGClass.cpp.
References clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::hasTrivialDestructor(), and clang::Decl::isUsed().
Referenced by EmitReferenceBindingToExpr().
| 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 1431 of file CGClass.cpp.
References Addr, EHStack, and clang::CodeGen::NormalAndEHCleanup.
| 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 677 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 694 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 712 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 732 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 |
| array | - a value of type elementType* |
| destructionKind | - the kind of destruction required |
| initializedElementCount | - a value of type size_t* holding the number of successfully-constructed elements |
Definition at line 1423 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by EmitNewArrayInitializer().
| 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 |
| array | - a value of type elementType* |
| destructionKind | - the kind of destruction required |
| initializedElementCount | - a value of type size_t* holding the number of successfully-constructed elements |
Definition at line 1442 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by emitArrayDestroy(), EmitCXXAggrConstructorCall(), and EmitNewArrayInitializer().
| void CodeGenFunction::registerGlobalDtorWithAtExit | ( | 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 183 of file CGDeclCXX.cpp.
References Builder, CGM, createAtExitStub(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), and clang::CodeGen::CodeGenTypeCache::IntTy.
Referenced by clang::CodeGen::CGCXXABI::registerGlobalDtor().
| void CodeGenFunction::ResolveBranchFixups | ( | llvm::BasicBlock * | Target | ) |
Definition at line 329 of file CGCleanup.cpp.
References clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, clang::CodeGen::BranchFixup::OptimisticBranchBlock, and TransitionToCleanupSwitch().
Referenced by EmitLabel().
| DominatingValue<T>::saved_type clang::CodeGen::CodeGenFunction::saveValueInCond | ( | T | value | ) | [inline] |
Definition at line 641 of file CodeGenFunction.h.
Referenced by pushFullExprCleanup().
| void clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional | ( | llvm::Value * | value, |
| llvm::Value * | addr | ||
| ) | [inline] |
Definition at line 945 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 3144 of file CGExpr.cpp.
References getLLVMContext().
| bool CodeGenFunction::ShouldInstrumentFunction | ( | ) |
ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls
Definition at line 217 of file CodeGenFunction.cpp.
References CGM, CurFuncDecl, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::Decl::hasAttr(), and clang::CodeGenOptions::InstrumentFunctions.
Referenced by FinishFunction(), and StartFunction().
| bool clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls | ( | ) | [inline] |
Definition at line 1214 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::OptimizationLevel.
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 226 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 | StartLoc | ||
| ) |
Definition at line 254 of file CodeGenFunction.cpp.
References AllocaInsertPt, AutoreleaseResult, Builder, CGM, createBasicBlock(), CreateIRTemp(), CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, EHStack, EmitFunctionInstrumentation(), EmitFunctionProlog(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitLoadOfLValue(), EmitLValueForField(), EmitMCountInstrumentation(), EmitStartEHSpec(), EmitVariablyModifiedType(), FnRetTy, clang::CXXRecordDecl::getCaptureFields(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::ASTContext::getFunctionType(), getJumpDestInCurrentScope(), clang::ABIArgInfo::getKind(), getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::FieldDecl::getParent(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getTagDeclType(), hasAggregateLLVMType(), clang::ABIArgInfo::Indirect, clang::CodeGenOptions::InstrumentForProfiling, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CXXRecordDecl::isLambda(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), LambdaCaptureFields, LambdaThisCaptureField, MakeNaturalAlignAddrLValue(), clang::CodeGenOptions::NoInline, NumArgs, PrologueCleanupDepth, ReturnBlock, ReturnValue, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateThunk(), and StartObjCMethod().
| 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 438 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::CodeGen::CodeGenModule::getModuleDebugInfo(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getResultType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isInstanceMethod(), clang::IdentifierInfo::isStr(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().
Referenced by GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), and GenerateObjCSetter().
| void CodeGenFunction::StoreComplexToAddr | ( | ComplexPairTy | V, |
| llvm::Value * | DestAddr, | ||
| bool | DestIsVolatile | ||
| ) |
StoreComplexToAddr - Store a complex number into the specified address.
Definition at line 806 of file CGExprComplex.cpp.
Referenced by EmitCall(), EmitComplexPrePostIncDec(), EmitExprAsInit(), EmitExprForReferenceBinding(), EmitFunctionEpilog(), generateObjCGetterBody(), and InitCatchParam().
| CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant | ( | DeclRefExpr * | refExpr | ) |
Try to emit a reference to the given value without producing it as an l-value. This is actually more than an optimization: we can't produce an l-value for variables that we never actually captured in a block or lambda, which means const int variables or constexpr literals or similar.
Definition at line 788 of file CGExpr.cpp.
References 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.
| QualType CodeGenFunction::TypeOfSelfObject | ( | ) |
TypeOfSelfObject - Return type of object that this self represents.
Definition at line 1352 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 1114 of file CodeGenFunction.cpp.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::unbind().
friend class CGCXXABI [friend] |
Definition at line 539 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 592 of file CodeGenFunction.h.
Referenced by CreateTempAlloca(), FinishFunction(), InitTempAlloca(), and StartFunction().
In ARC, whether we should autorelease the return value.
Definition at line 602 of file CodeGenFunction.h.
Referenced by EmitFunctionEpilog(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().
Definition at line 604 of file CodeGenFunction.h.
Referenced by EmitLambdaBlockInvokeBody(), and EmitParmDecl().
Definition at line 605 of file CodeGenFunction.h.
Referenced by LoadBlockStruct().
| unsigned char clang::CodeGen::CodeGenFunction::BoundsChecking |
BoundsChecking - Emit run-time bounds checks. Higher values mean potentially higher performance penalties.
Definition at line 596 of file CodeGenFunction.h.
Definition at line 565 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), AdjustRelatedResultType(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), BuildVirtualCall(), CallBeginCatch(), CheckAggExprForMemSetUse(), CoerceIntOrPtrToIntOrPtr(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), CreateTempAlloca(), EmitAggMemberInitializer(), EmitAggregateCopy(), EmitAnnotationCall(), EmitAnyExprToExn(), emitARCCopyOperation(), EmitARCDestroyWeak(), EmitARCInitWeak(), emitARCLoadOperation(), EmitARCRelease(), emitARCRetainAfterCall(), EmitARCRetainAutorelease(), EmitARCRetainAutoreleasedReturnValue(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), EmitArrayDelete(), emitArrayDestroy(), emitArrayLength(), EmitArraySubscriptExpr(), EmitAsmStmt(), EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBadCastCall(), EmitBadTypeidCall(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), EmitBitCastOfLValueToProperType(), EmitBlock(), EmitBlockAfterUses(), EmitBranch(), EmitBranchOnBoolExpr(), EmitCall(), EmitCallExpr(), EmitCallOrInvoke(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastLValue(), EmitCastToVoidPtr(), emitCatchDispatchBlock(), EmitCheck(), EmitCleanup(), EmitComplexPrePostIncDec(), EmitConditionalOperatorLValue(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitDeclInvariant(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDeleteCall(), emitDestroy(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastCall(), EmitExtendGCLifetime(), EmitExtVectorElementExpr(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), EmitForStmt(), EmitFromInt(), EmitFromMemory(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), EmitGlobalVarDeclLValue(), EmitIfStmt(), EmitIndirectGotoStmt(), EmitInitializerForField(), EmitLandingPad(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMCountInstrumentation(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolPush(), EmitObjCAutoreleasePoolStmt(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCMessageExpr(), EmitObjCMRRAutoreleasePoolPush(), EmitObjCProtocolExpr(), EmitObjCSelectorExpr(), EmitObjCSelectorLValue(), EmitObjectDelete(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitRecursiveStdInitializerListCleanup(), EmitReturnBlock(), EmitReturnStmt(), EmitScalarInit(), EmitStdInitializerListCleanup(), EmitStmt(), EmitStopPoint(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CGCXXABI::EmitThisParam(), EmitToInt(), EmitToMemory(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeidFromVTable(), EmitUnaryOpLValue(), EmitVAArgFromMemory(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVariablyModifiedType(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EmitZeroMemSet(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), findDominatingStoreToReturnValue(), FinishFunction(), clang::CodeGen::CodeGenFunction::LexicalScope::ForceCleanup(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateVarArgsThunk(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getEHResumeBlock(), getExceptionFromSlot(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), getSelectorFromSlot(), getTerminateHandler(), getTerminateLandingPad(), getTrapBB(), GetVirtualBaseClassOffset(), getVLASize(), GetVTablePtr(), GetVTTParameter(), HaveInsertPoint(), InitCatchParam(), initFullExprCleanup(), InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), LoadObjCSelf(), PerformReturnAdjustment(), PerformTypeAdjustment(), protectFromPeepholes(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), registerGlobalDtorWithAtExit(), ResolveAllBranchFixups(), clang::CodeGen::DominatingLLVMValue::restore(), clang::CodeGen::DominatingLLVMValue::save(), SetupCleanupBlockActivation(), SimplifyCleanupEntry(), StartFunction(), tryEmitARCRetainScalarExpr(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
CatchUndefined - Emit run-time checks to catch undefined behaviors.
Definition at line 599 of file CodeGenFunction.h.
Referenced by CodeGenFunction(), and EmitCheck().
Definition at line 561 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), BuildVirtualCall(), CalculateCookiePadding(), CodeGenFunction(), ConvertType(), ConvertTypeForMem(), CreateCoercedLoad(), CreateCoercedStore(), CreateReferenceTemporary(), CreateStaticVarDecl(), EmitAggregateCopy(), EmitAnnotationCall(), emitARCCopyOperation(), emitARCLoadOperation(), emitARCStoreOperation(), emitARCValueOperation(), EmitArrayDelete(), EmitAsmStmt(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), EmitCall(), EmitCallOrInvoke(), EmitCaseStmt(), emitCatchDispatchBlock(), EmitCheck(), EmitCompoundLiteralLValue(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXMemberCall(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXOperatorMemberCallee(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefExprDbgValue(), EmitDeclRefLValue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDeleteCall(), EmitDestructorBody(), EmitDynamicCastCall(), EmitEndEHSpec(), EmitFAbs(), EmitFieldAnnotations(), EmitForwardingCallToLambda(), EmitFunctionDeclLValue(), EmitFunctionInstrumentation(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), EmitGlobalVarDeclLValue(), EmitInitializerForField(), EmitIvarOffset(), EmitLambdaStaticInvokeFunction(), EmitLambdaToBlockPointerBody(), EmitLandingPad(), EmitLoadOfBitfieldLValue(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForBitfield(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForIvar(), EmitMCountInstrumentation(), EmitNewInitializer(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCEncodeExprLValue(), EmitObjCMessageExpr(), EmitObjCProtocolExpr(), EmitObjCSelectorExpr(), EmitObjCSelectorLValue(), EmitObjCStringLiteral(), EmitParmDecl(), emitPointerArithmetic(), EmitPointerToDataMemberBinaryExpr(), EmitPredefinedLValue(), EmitReferenceBindingToExpr(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughLValue(), EmitStringLiteralLValue(), emitStructGetterCall(), emitStructSetterCall(), EmitSynthesizedCXXCopyCtorCall(), EmitVAArg(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVarDecl(), enterBlockScope(), EnterCXXTryStmt(), EnterStructPointerForCoercedAccess(), ErrorUnsupported(), ErrorUnsupportedABI(), EvaluateExprAsBool(), FinishFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCode(), generateDestroyHelper(), GenerateThunk(), GenerateVarArgsThunk(), GetAddressOfDerivedClass(), getAllocateExceptionFn(), getARCCleanupKind(), getAsmSrcLocInfo(), getBadCastFn(), getBadTypeidFn(), getBeginCatchFn(), getCatchallRethrowFn(), getContext(), getDynamicCastFn(), getEHResumeBlock(), getEndCatchFn(), getFreeExceptionFn(), getGetExceptionPtrFn(), getInvokeDestImpl(), getLangOpts(), getLLVMContext(), getReThrowFn(), GetStaticDeclName(), getTerminateFn(), getTerminateLandingPad(), getThrowFn(), getTrapBB(), getTypes(), getUnexpectedFn(), getUnwindResumeFn(), getUnwindResumeOrRethrowFn(), GetVirtualBaseClassOffset(), GetVTablePtr(), GetVTTParameter(), InitCatchParam(), InitializeVTablePointer(), InitializeVTablePointers(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), needsEHCleanup(), registerGlobalDtorWithAtExit(), ShouldInstrumentFunction(), shouldUseFusedARCCalls(), StartFunction(), StartObjCMethod(), tryEmitAsConstant(), tryEmitFusedAutoreleaseOfResult(), and tryRemoveRetainOfSelf().
CurCodeDecl - This is the inner-most code context, which includes blocks.
Definition at line 571 of file CodeGenFunction.h.
Referenced by EmitDeclRefLValue(), EmitObjCMessageExpr(), EmitParmDecl(), EmitPredefinedLValue(), ErrorUnsupportedABI(), ExitCXXTryStmt(), FinishFunction(), StartFunction(), and tryRemoveRetainOfSelf().
| llvm::Function* clang::CodeGen::CodeGenFunction::CurFn |
Definition at line 574 of file CodeGenFunction.h.
Referenced by CreateStaticVarDecl(), EmitAtomicExpr(), EmitBlock(), EmitBlockAfterUses(), EmitCaseStmtRange(), EmitDestructorBody(), EmitFunctionEpilog(), EmitFunctionInstrumentation(), EmitIfUsed(), EmitPredefinedLValue(), EmitVarDecl(), enterBlockScope(), GenerateCode(), GenerateVarArgsThunk(), GetAddrOfLabel(), GetStaticDeclName(), and StartFunction().
Definition at line 572 of file CodeGenFunction.h.
Referenced by EmitForwardingCallToLambda(), FinishFunction(), GenerateThunk(), and StartFunction().
CurFuncDecl - Holds the Decl for the current function or ObjC method. This excludes BlockDecls.
Definition at line 569 of file CodeGenFunction.h.
Referenced by EmitFunctionProlog(), EmitLambdaToBlockPointerBody(), EmitObjCMessageExpr(), GetStaticDeclName(), GetVTTParameter(), LoadObjCSelf(), ShouldInstrumentFunction(), StartFunction(), and TypeOfSelfObject().
CurGD - The GlobalDecl for the current function being compiled.
Definition at line 577 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGCXXABI::BuildThisParam(), EmitConstructorBody(), EmitCXXConstructExpr(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), EmitFunctionBody(), GenerateCode(), GenerateThunk(), GetVTTParameter(), InitializeVTablePointer(), and StartObjCMethod().
void CodeGenFunction::destroyARCStrongImprecise [static] |
Definition at line 2328 of file CodeGenFunction.h.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitExprForReferenceBinding(), EmitReferenceBindingToExpr(), and enterBlockScope().
void CodeGenFunction::destroyARCStrongPrecise [static] |
Definition at line 2329 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), EmitReferenceBindingToExpr(), and getDestroyer().
void CodeGenFunction::destroyARCWeak [static] |
Definition at line 2330 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), EmitExprForReferenceBinding(), EmitReferenceBindingToExpr(), and getDestroyer().
void CodeGenFunction::destroyCXXObject [static] |
Definition at line 1801 of file CodeGenFunction.h.
Referenced by EmitCXXAggrConstructorCall(), and getDestroyer().
| llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock |
EHResumeBlock - Unified block containing a call to llvm.eh.resume.
Definition at line 625 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 633 of file CodeGenFunction.h.
Referenced by getEHSelectorSlot().
Definition at line 614 of file CodeGenFunction.h.
Referenced by CallBeginCatch(), EmitAnyExprToExn(), EmitArrayDelete(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), EmitCleanup(), EmitConstructorBody(), emitCXXDestructMethod(), EmitDelegatingCXXConstructorCall(), EmitEndEHSpec(), EmitInitializerForField(), 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(), PushDestructorCleanup(), pushFullExprCleanup(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), ResolveAllBranchFixups(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), and StartObjCMethod().
The exception slot. All landing pads write the current exception pointer into this alloca.
Definition at line 629 of file CodeGenFunction.h.
Referenced by getExceptionSlot().
FirstBlockInfo - The head of a singly-linked-list of block layouts.
Definition at line 622 of file CodeGenFunction.h.
Referenced by enterBlockScope(), and ~CodeGenFunction().
Definition at line 573 of file CodeGenFunction.h.
Referenced by EmitReturnStmt(), and StartFunction().
| llvm::DenseMap<const VarDecl *, FieldDecl *> clang::CodeGen::CodeGenFunction::LambdaCaptureFields |
Definition at line 607 of file CodeGenFunction.h.
Referenced by EmitDeclRefLValue(), and StartFunction().
Definition at line 608 of file CodeGenFunction.h.
Referenced by StartFunction().
Definition at line 619 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 617 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 612 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 648 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 581 of file CodeGenFunction.h.
Referenced by FinishFunction(), and StartFunction().
ReturnBlock - Unified return block.
Definition at line 584 of file CodeGenFunction.h.
Referenced by EmitReturnBlock(), EmitReturnStmt(), and StartFunction().
ReturnValue - The temporary alloca to hold the return value. This is null iff the function has no return value.
Definition at line 588 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca(), EmitCallExpr(), EmitCXXMemberPointerCallExpr(), EmitForwardingCallToLambda(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitReturnStmt(), emitStructGetterCall(), findDominatingStoreToReturnValue(), generateObjCGetterBody(), GenerateThunk(), and StartFunction().
Definition at line 562 of file CodeGenFunction.h.
Referenced by EmitAsmStmt(), EmitAutoVarAlloca(), EmitIndirectGotoStmt(), EmitMCountInstrumentation(), EmitReturnStmt(), and getAsmSrcLocInfo().