Lines Matching refs:CGF
38 CodeGenFunction &CGF; member in __anon71a4cd2d0111::AggExprEmitter
45 return CGF.CreateAggTemp(T, "agg.tmp.ensured"); in EnsureSlot()
49 Dest = CGF.CreateAggTemp(T, "agg.tmp.ensured"); in EnsureDest()
63 : CGF(cgf), Builder(CGF.Builder), Dest(Dest), in AggExprEmitter()
94 if (CGF.getLangOpts().getGC() && TypeRequiresGCollection(T)) in needsGC()
106 ApplyDebugLocation DL(CGF, E); in Visit()
111 CGF.ErrorUnsupported(S, "aggregate expression"); in VisitStmt()
118 CGF.EmitCoawaitExpr(*E, Dest, IsResultUnused); in VisitCoawaitExpr()
121 CGF.EmitCoyieldExpr(*E, Dest, IsResultUnused); in VisitCoyieldExpr()
130 if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) { in VisitConstantExpr()
131 CGF.EmitAggregateStore(Result, Dest.getAddress(), in VisitConstantExpr()
178 CodeGenFunction::CXXDefaultArgExprScope Scope(CGF, DAE); in VisitCXXDefaultArgExpr()
182 CodeGenFunction::CXXDefaultInitExprScope Scope(CGF, DIE); in VisitCXXDefaultInitExpr()
198 LValue LV = CGF.EmitPseudoObjectLValue(E); in VisitPseudoObjectExpr()
202 CGF.EmitPseudoObjectRValue(E, EnsureSlot(E->getType())); in VisitPseudoObjectExpr()
210 void VisitCXXThrowExpr(const CXXThrowExpr *E) { CGF.EmitCXXThrowExpr(E); } in VisitCXXThrowExpr()
212 RValue Res = CGF.EmitAtomicExpr(E); in VisitAtomicExpr()
226 LValue LV = CGF.EmitLValue(E); in EmitAggLoadOfLValue()
229 if (LV.getType()->isAtomicType() || CGF.LValueIsSuitableForInlineAtomic(LV)) { in EmitAggLoadOfLValue()
230 CGF.EmitAtomicLoad(LV, E->getExprLoc(), Dest); in EmitAggLoadOfLValue()
278 RetAddr = CGF.CreateMemTemp(RetTy, "tmp", &RetAllocaAddr); in withReturnValueSlot()
280 CGF.CGM.getDataLayout().getTypeAllocSize(CGF.ConvertTypeForMem(RetTy)); in withReturnValueSlot()
281 LifetimeSizePtr = CGF.EmitLifetimeStart(Size, RetAllocaAddr.getPointer()); in withReturnValueSlot()
289 CGF.pushFullExprCleanup<CodeGenFunction::CallLifetimeEnd>( in withReturnValueSlot()
291 LifetimeEndBlock = CGF.EHStack.stable_begin(); in withReturnValueSlot()
309 CGF.DeactivateCleanupBlock(LifetimeEndBlock, LifetimeStartInst); in withReturnValueSlot()
310 CGF.EmitLifetimeEnd(LifetimeSizePtr, RetAllocaAddr.getPointer()); in withReturnValueSlot()
317 LValue srcLV = CGF.MakeAddrLValue(src.getAggregateAddress(), type); in EmitFinalDestCopy()
332 LValue DstLV = CGF.MakeAddrLValue( in EmitFinalDestCopy()
338 CGF.callCStructMoveAssignmentOperator(DstLV, src); in EmitFinalDestCopy()
340 CGF.callCStructMoveConstructor(DstLV, src); in EmitFinalDestCopy()
346 CGF.callCStructCopyAssignmentOperator(DstLV, src); in EmitFinalDestCopy()
348 CGF.callCStructCopyConstructor(DstLV, src); in EmitFinalDestCopy()
354 src, CGF, AggValueSlot::IsDestructed, needsGC(type), in EmitFinalDestCopy()
366 CharUnits sz = dest.getPreferredSize(CGF.getContext(), type); in EmitCopy()
367 llvm::Value *size = llvm::ConstantInt::get(CGF.SizeTy, sz.getQuantity()); in EmitCopy()
368 CGF.CGM.getObjCRuntime().EmitGCMemmoveCollectable(CGF, in EmitCopy()
378 LValue DestLV = CGF.MakeAddrLValue(dest.getAddress(), type); in EmitCopy()
379 LValue SrcLV = CGF.MakeAddrLValue(src.getAddress(), type); in EmitCopy()
380 CGF.EmitAggregateCopy(DestLV, SrcLV, type, dest.mayOverlap(), in EmitCopy()
390 ASTContext &Ctx = CGF.getContext(); in VisitCXXStdInitializerListExpr()
391 LValue Array = CGF.EmitLValue(E->getSubExpr()); in VisitCXXStdInitializerListExpr()
393 Address ArrayPtr = Array.getAddress(CGF); in VisitCXXStdInitializerListExpr()
403 CGF.ErrorUnsupported(E, "weird std::initializer_list"); in VisitCXXStdInitializerListExpr()
411 CGF.ErrorUnsupported(E, "weird std::initializer_list"); in VisitCXXStdInitializerListExpr()
416 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); in VisitCXXStdInitializerListExpr()
417 LValue Start = CGF.EmitLValueForFieldInitialization(DestLV, *Field); in VisitCXXStdInitializerListExpr()
418 llvm::Value *Zero = llvm::ConstantInt::get(CGF.PtrDiffTy, 0); in VisitCXXStdInitializerListExpr()
422 CGF.EmitStoreThroughLValue(RValue::get(ArrayStart), Start); in VisitCXXStdInitializerListExpr()
426 CGF.ErrorUnsupported(E, "weird std::initializer_list"); in VisitCXXStdInitializerListExpr()
431 LValue EndOrLength = CGF.EmitLValueForFieldInitialization(DestLV, *Field); in VisitCXXStdInitializerListExpr()
439 CGF.EmitStoreThroughLValue(RValue::get(ArrayEnd), EndOrLength); in VisitCXXStdInitializerListExpr()
442 CGF.EmitStoreThroughLValue(RValue::get(Size), EndOrLength); in VisitCXXStdInitializerListExpr()
444 CGF.ErrorUnsupported(E, "weird std::initializer_list"); in VisitCXXStdInitializerListExpr()
481 CGF.getContext().getAsArrayType(ArrayQTy)->getElementType(); in EmitArrayInit()
485 llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0); in EmitArrayInit()
490 CharUnits elementSize = CGF.getContext().getTypeSizeInChars(elementType); in EmitArrayInit()
498 elementType.isTriviallyCopyableType(CGF.getContext())) { in EmitArrayInit()
499 CodeGen::CodeGenModule &CGM = CGF.CGM; in EmitArrayInit()
500 ConstantEmitter Emitter(CGF); in EmitArrayInit()
512 EmitFinalDestCopy(ArrayQTy, CGF.MakeAddrLValue(GV, ArrayQTy, Align)); in EmitArrayInit()
524 if (CGF.needsEHCleanup(dtorKind)) { in EmitArrayInit()
529 endOfInit = CGF.CreateTempAlloca(begin->getType(), CGF.getPointerAlign(), in EmitArrayInit()
532 CGF.pushIrregularPartialArrayCleanup(begin, endOfInit, elementType, in EmitArrayInit()
534 CGF.getDestroyer(dtorKind)); in EmitArrayInit()
535 cleanup = CGF.EHStack.stable_begin(); in EmitArrayInit()
542 llvm::Value *one = llvm::ConstantInt::get(CGF.SizeTy, 1); in EmitArrayInit()
564 CGF.MakeAddrLValue(Address(element, elementAlign), elementType); in EmitArrayInit()
577 CGF.getTypes().isZeroInitializable(elementType))) { in EmitArrayInit()
590 llvm::ConstantInt::get(CGF.SizeTy, NumArrayElements), in EmitArrayInit()
594 llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body"); in EmitArrayInit()
597 CGF.EmitBlock(bodyBB); in EmitArrayInit()
609 CodeGenFunction::RunCleanupsScope CleanupsScope(CGF); in EmitArrayInit()
611 CGF.MakeAddrLValue(Address(currentElement, elementAlign), elementType); in EmitArrayInit()
628 llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end"); in EmitArrayInit()
632 CGF.EmitBlock(endBB); in EmitArrayInit()
636 if (dtorKind) CGF.DeactivateCleanupBlock(cleanup, cleanupDominator); in EmitArrayInit()
652 EmitFinalDestCopy(e->getType(), CGF.getOrCreateOpaqueLValueMapping(e)); in VisitOpaqueValueExpr()
658 E->getType().isPODType(CGF.getContext())) { in VisitCompoundLiteralExpr()
670 !CGF.getLangOpts().CPlusPlus && !Slot.isExternallyDestructed(); in VisitCompoundLiteralExpr()
674 CGF.EmitAggExpr(E->getInitializer(), Slot); in VisitCompoundLiteralExpr()
678 CGF.pushLifetimeExtendedDestroy( in VisitCompoundLiteralExpr()
679 CGF.getCleanupKind(DtorKind), Slot.getAddress(), E->getType(), in VisitCompoundLiteralExpr()
680 CGF.getDestroyer(DtorKind), DtorKind & EHCleanup); in VisitCompoundLiteralExpr()
696 CGF.CGM.EmitExplicitCastExprType(ECE, &CGF); in VisitCastExpr()
701 LValue LV = CGF.EmitCheckedLValue(E->getSubExpr(), in VisitCastExpr()
705 CGF.EmitDynamicCast(LV.getAddress(CGF), cast<CXXDynamicCastExpr>(E)); in VisitCastExpr()
707 CGF.CGM.ErrorUnsupported(E, "non-simple lvalue dynamic_cast"); in VisitCastExpr()
710 CGF.CGM.ErrorUnsupported(E, "lvalue dynamic_cast with a destination"); in VisitCastExpr()
717 CGF.EmitAnyExpr(E->getSubExpr(), AggValueSlot::ignored(), in VisitCastExpr()
725 Builder.CreateElementBitCast(Dest.getAddress(), CGF.ConvertType(Ty)); in VisitCastExpr()
727 CGF.MakeAddrLValue(CastPtr, Ty)); in VisitCastExpr()
733 CGF.EmitAnyExpr(E->getSubExpr(), AggValueSlot::ignored(), in VisitCastExpr()
738 LValue SourceLV = CGF.EmitLValue(E->getSubExpr()); in VisitCastExpr()
740 Builder.CreateElementBitCast(SourceLV.getAddress(CGF), CGF.Int8Ty); in VisitCastExpr()
742 Builder.CreateElementBitCast(Dest.getAddress(), CGF.Int8Ty); in VisitCastExpr()
744 CGF.SizeTy, in VisitCastExpr()
745 CGF.getContext().getTypeSizeInChars(E->getType()).getQuantity()); in VisitCastExpr()
767 assert(CGF.getContext().hasSameUnqualifiedType(valueType, in VisitCastExpr()
772 if (Dest.isIgnored() || !CGF.CGM.isPaddedAtomicType(atomicType)) { in VisitCastExpr()
781 findPeephole(E->getSubExpr(), peepholeTarget, CGF.getContext())) { in VisitCastExpr()
782 assert(CGF.getContext().hasSameUnqualifiedType(op->getType(), in VisitCastExpr()
792 if (!valueDest.isIgnored() && CGF.CGM.isPaddedAtomicType(atomicType)) { in VisitCastExpr()
796 CGF.EmitNullInitialization(Dest.getAddress(), atomicType); in VisitCastExpr()
800 CGF.Builder.CreateStructGEP(valueDest.getAddress(), 0); in VisitCastExpr()
810 CGF.EmitAggExpr(E->getSubExpr(), valueDest); in VisitCastExpr()
817 CGF.CreateAggTemp(atomicType, "atomic-to-nonatomic.temp"); in VisitCastExpr()
818 CGF.EmitAggExpr(E->getSubExpr(), atomicSlot); in VisitCastExpr()
840 CGF.pushDestroy(QualType::DK_nontrivial_c_struct, Dest.getAddress(), in VisitCastExpr()
852 assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(), in VisitCastExpr()
917 if (E->getCallReturnType(CGF.getContext())->isReferenceType()) { in VisitCallExpr()
923 return CGF.EmitCallExpr(E, Slot); in VisitCallExpr()
929 return CGF.EmitObjCMessageExpr(E, Slot); in VisitObjCMessageExpr()
934 CGF.EmitIgnoredExpr(E->getLHS()); in VisitBinComma()
939 CodeGenFunction::StmtExprEvaluation eval(CGF); in VisitStmtExpr()
940 CGF.EmitCompoundStmt(*E->getSubStmt(), true, Dest); in VisitStmtExpr()
949 static llvm::Value *EmitCompare(CGBuilderTy &Builder, CodeGenFunction &CGF, in EmitCompare() argument
960 return CGF.CGM.getCXXABI().EmitMemberPointerComparison( in EmitCompare()
961 CGF, LHS, RHS, MPT, /*IsInequality*/ false); in EmitCompare()
1003 assert(CGF.getContext().hasSameType(E->getLHS()->getType(), in VisitBinCmp()
1006 CGF.getContext().CompCategories.getInfoForType(E->getType()); in VisitBinCmp()
1015 return CGF.ErrorUnsupported(E, "aggregate three-way comparison"); in VisitBinCmp()
1021 RValue RV = CGF.EmitAnyExpr(E); in VisitBinCmp()
1033 Value *Cmp = EmitCompare(Builder, CGF, E, LHSValues.first, RHSValues.first, in VisitBinCmp()
1038 Value *CmpImag = EmitCompare(Builder, CGF, E, LHSValues.second, in VisitBinCmp()
1068 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); in VisitBinCmp()
1072 LValue FieldLV = CGF.EmitLValueForFieldInitialization( in VisitBinCmp()
1074 CGF.EmitStoreThroughLValue(RValue::get(Select), FieldLV, /*IsInit*/ true); in VisitBinCmp()
1083 CGF.ErrorUnsupported(E, "aggregate binary expression"); in VisitBinaryOperator()
1088 LValue LV = CGF.EmitPointerToDataMemberBinaryExpr(E); in VisitPointerToDataMemberBinaryOperator()
1161 assert(CGF.getContext().hasSameUnqualifiedType(E->getLHS()->getType(), in VisitBinAssign()
1170 E->getRHS()->HasSideEffects(CGF.getContext())) { in VisitBinAssign()
1176 LValue LHS = CGF.EmitCheckedLValue(E->getLHS(), CodeGenFunction::TCK_Store); in VisitBinAssign()
1180 CGF.LValueIsSuitableForInlineAtomic(LHS)) { in VisitBinAssign()
1181 CGF.EmitAtomicStore(Dest.asRValue(), LHS, /*isInit*/ false); in VisitBinAssign()
1186 AggValueSlot::forLValue(LHS, CGF, AggValueSlot::IsDestructed, in VisitBinAssign()
1194 LValue LHS = CGF.EmitLValue(E->getLHS()); in VisitBinAssign()
1199 CGF.LValueIsSuitableForInlineAtomic(LHS)) { in VisitBinAssign()
1202 CGF.EmitAtomicStore(Dest.asRValue(), LHS, /*isInit*/ false); in VisitBinAssign()
1208 LHS, CGF, AggValueSlot::IsDestructed, needsGC(E->getLHS()->getType()), in VisitBinAssign()
1212 CGF.hasVolatileMember(E->getLHS()->getType())) in VisitBinAssign()
1215 CGF.EmitAggExpr(E->getRHS(), LHSSlot); in VisitBinAssign()
1222 CGF.pushDestroy(QualType::DK_nontrivial_c_struct, Dest.getAddress(), in VisitBinAssign()
1228 llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true"); in VisitAbstractConditionalOperator()
1229 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false"); in VisitAbstractConditionalOperator()
1230 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end"); in VisitAbstractConditionalOperator()
1233 CodeGenFunction::OpaqueValueMapping binding(CGF, E); in VisitAbstractConditionalOperator()
1235 CodeGenFunction::ConditionalEvaluation eval(CGF); in VisitAbstractConditionalOperator()
1236 CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock, in VisitAbstractConditionalOperator()
1237 CGF.getProfileCount(E)); in VisitAbstractConditionalOperator()
1247 eval.begin(CGF); in VisitAbstractConditionalOperator()
1248 CGF.EmitBlock(LHSBlock); in VisitAbstractConditionalOperator()
1249 CGF.incrementProfileCounter(E); in VisitAbstractConditionalOperator()
1251 eval.end(CGF); in VisitAbstractConditionalOperator()
1253 assert(CGF.HaveInsertPoint() && "expression evaluation ended with no IP!"); in VisitAbstractConditionalOperator()
1254 CGF.Builder.CreateBr(ContBlock); in VisitAbstractConditionalOperator()
1262 eval.begin(CGF); in VisitAbstractConditionalOperator()
1263 CGF.EmitBlock(RHSBlock); in VisitAbstractConditionalOperator()
1265 eval.end(CGF); in VisitAbstractConditionalOperator()
1268 CGF.pushDestroy(QualType::DK_nontrivial_c_struct, Dest.getAddress(), in VisitAbstractConditionalOperator()
1271 CGF.EmitBlock(ContBlock); in VisitAbstractConditionalOperator()
1280 Address ArgPtr = CGF.EmitVAArg(VE, ArgValue); in VisitVAArgExpr()
1284 CGF.ErrorUnsupported(VE, "aggregate va_arg expression"); in VisitVAArgExpr()
1288 EmitFinalDestCopy(VE->getType(), CGF.MakeAddrLValue(ArgPtr, VE->getType())); in VisitVAArgExpr()
1304 CGF.EmitCXXTemporary(E->getTemporary(), E->getType(), Dest.getAddress()); in VisitCXXBindTemporaryExpr()
1310 CGF.EmitCXXConstructExpr(E, Slot); in VisitCXXConstructExpr()
1316 CGF.EmitInheritedCXXConstructorCall( in VisitCXXInheritedCtorInitExpr()
1324 LValue SlotLV = CGF.MakeAddrLValue(Slot.getAddress(), E->getType()); in VisitLambdaExpr()
1336 LValue LV = CGF.EmitLValueForFieldInitialization(SlotLV, *CurField); in VisitLambdaExpr()
1338 CGF.EmitLambdaVLACapture(CurField->getCapturedVLAType(), LV); in VisitLambdaExpr()
1348 if (CGF.needsEHCleanup(DtorKind)) { in VisitLambdaExpr()
1350 CleanupDominator = CGF.Builder.CreateAlignedLoad( in VisitLambdaExpr()
1351 CGF.Int8Ty, in VisitLambdaExpr()
1352 llvm::Constant::getNullValue(CGF.Int8PtrTy), in VisitLambdaExpr()
1355 CGF.pushDestroy(EHCleanup, LV.getAddress(CGF), CurField->getType(), in VisitLambdaExpr()
1356 CGF.getDestroyer(DtorKind), false); in VisitLambdaExpr()
1357 Cleanups.push_back(CGF.EHStack.stable_begin()); in VisitLambdaExpr()
1365 CGF.DeactivateCleanupBlock(Cleanups[i-1], CleanupDominator); in VisitLambdaExpr()
1373 CodeGenFunction::RunCleanupsScope cleanups(CGF); in VisitExprWithCleanups()
1380 EmitNullInitializationToLValue(CGF.MakeAddrLValue(Slot.getAddress(), T)); in VisitCXXScalarValueInitExpr()
1386 EmitNullInitializationToLValue(CGF.MakeAddrLValue(Slot.getAddress(), T)); in VisitImplicitValueInitExpr()
1486 static bool isSimpleZero(const Expr *E, CodeGenFunction &CGF) { in isSimpleZero() argument
1502 CGF.getTypes().isZeroInitializable(E->getType())) in isSimpleZero()
1507 CGF.getTypes().isPointerZeroInitializable(E->getType()) && in isSimpleZero()
1508 !E->HasSideEffects(CGF.getContext()); in isSimpleZero()
1523 if (Dest.isZeroed() && isSimpleZero(E, CGF)) { in EmitInitializationToLValue()
1532 RValue RV = CGF.EmitReferenceBindingToExpr(E); in EmitInitializationToLValue()
1533 return CGF.EmitStoreThroughLValue(RV, LV); in EmitInitializationToLValue()
1536 switch (CGF.getEvaluationKind(type)) { in EmitInitializationToLValue()
1538 CGF.EmitComplexExprIntoLValue(E, LV, /*isInit*/ true); in EmitInitializationToLValue()
1541 CGF.EmitAggExpr( in EmitInitializationToLValue()
1542 E, AggValueSlot::forLValue(LV, CGF, AggValueSlot::IsDestructed, in EmitInitializationToLValue()
1549 CGF.EmitScalarInit(E, /*D=*/nullptr, LV, /*Captured=*/false); in EmitInitializationToLValue()
1551 CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV); in EmitInitializationToLValue()
1563 if (Dest.isZeroed() && CGF.getTypes().isZeroInitializable(type)) in EmitNullInitializationToLValue()
1566 if (CGF.hasScalarEvaluationKind(type)) { in EmitNullInitializationToLValue()
1568 llvm::Value *null = CGF.CGM.EmitNullConstant(type); in EmitNullInitializationToLValue()
1572 CGF.EmitStoreThroughBitfieldLValue(RValue::get(null), lv); in EmitNullInitializationToLValue()
1575 CGF.EmitStoreOfScalar(null, lv, /* isInitialization */ true); in EmitNullInitializationToLValue()
1581 CGF.EmitNullInitialization(lv.getAddress(CGF), lv.getType()); in EmitNullInitializationToLValue()
1592 if (llvm::Constant* C = CGF.CGM.EmitConstantExpr(E, E->getType(), &CGF)) { in VisitInitListExpr()
1594 new llvm::GlobalVariable(CGF.CGM.getModule(), C->getType(), true, in VisitInitListExpr()
1596 EmitFinalDestCopy(E->getType(), CGF.MakeAddrLValue(GV, E->getType())); in VisitInitListExpr()
1601 CGF.ErrorUnsupported(E, "GNU array range designator extension"); in VisitInitListExpr()
1608 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); in VisitInitListExpr()
1633 cleanupDominator = CGF.Builder.CreateAlignedLoad( in VisitInitListExpr()
1634 CGF.Int8Ty, llvm::Constant::getNullValue(CGF.Int8PtrTy), in VisitInitListExpr()
1647 Address V = CGF.GetAddressOfDirectBaseInCompleteClass( in VisitInitListExpr()
1655 CGF.getOverlapForBaseInit(CXXRD, BaseRD, Base.isVirtual())); in VisitInitListExpr()
1656 CGF.EmitAggExpr(E->getInit(curInitIndex++), AggSlot); in VisitInitListExpr()
1660 CGF.pushDestroy(dtorKind, V, Base.getType()); in VisitInitListExpr()
1661 addCleanup(CGF.EHStack.stable_begin()); in VisitInitListExpr()
1667 CodeGenFunction::FieldConstructionScope FCS(CGF, Dest.getAddress()); in VisitInitListExpr()
1687 LValue FieldLoc = CGF.EmitLValueForFieldInitialization(DestLV, Field); in VisitInitListExpr()
1714 CGF.getTypes().isZeroInitializable(E->getType())) in VisitInitListExpr()
1718 LValue LV = CGF.EmitLValueForFieldInitialization(DestLV, field); in VisitInitListExpr()
1737 if (CGF.needsEHCleanup(dtorKind)) { in VisitInitListExpr()
1738 CGF.pushDestroy(EHCleanup, LV.getAddress(CGF), field->getType(), in VisitInitListExpr()
1739 CGF.getDestroyer(dtorKind), false); in VisitInitListExpr()
1740 addCleanup(CGF.EHStack.stable_begin()); in VisitInitListExpr()
1749 dyn_cast<llvm::GetElementPtrInst>(LV.getPointer(CGF))) in VisitInitListExpr()
1759 CGF.DeactivateCleanupBlock(cleanups[i-1], cleanupDominator); in VisitInitListExpr()
1769 CodeGenFunction::OpaqueValueMapping binding(CGF, E->getCommonExpr()); in VisitArrayInitLoopExpr()
1778 llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0); in VisitArrayInitLoopExpr()
1790 CGF.getContext().getAsArrayType(E->getType())->getElementType(); in VisitArrayInitLoopExpr()
1791 CharUnits elementSize = CGF.getContext().getTypeSizeInChars(elementType); in VisitArrayInitLoopExpr()
1796 llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body"); in VisitArrayInitLoopExpr()
1799 CGF.EmitBlock(bodyBB); in VisitArrayInitLoopExpr()
1808 if (CGF.needsEHCleanup(dtorKind) && !InnerLoop) { in VisitArrayInitLoopExpr()
1811 CGF.pushRegularPartialArrayCleanup(outerBegin, element, elementType, in VisitArrayInitLoopExpr()
1813 CGF.getDestroyer(dtorKind)); in VisitArrayInitLoopExpr()
1814 cleanup = CGF.EHStack.stable_begin(); in VisitArrayInitLoopExpr()
1823 CodeGenFunction::RunCleanupsScope CleanupsScope(CGF); in VisitArrayInitLoopExpr()
1824 CodeGenFunction::ArrayInitLoopExprScope Scope(CGF, index); in VisitArrayInitLoopExpr()
1826 CGF.MakeAddrLValue(Address(element, elementAlign), elementType); in VisitArrayInitLoopExpr()
1831 elementLV, CGF, AggValueSlot::IsDestructed, in VisitArrayInitLoopExpr()
1834 AggExprEmitter(CGF, elementSlot, false) in VisitArrayInitLoopExpr()
1842 index, llvm::ConstantInt::get(CGF.SizeTy, 1), "arrayinit.next"); in VisitArrayInitLoopExpr()
1847 nextIndex, llvm::ConstantInt::get(CGF.SizeTy, numElements), in VisitArrayInitLoopExpr()
1849 llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end"); in VisitArrayInitLoopExpr()
1852 CGF.EmitBlock(endBB); in VisitArrayInitLoopExpr()
1856 CGF.DeactivateCleanupBlock(cleanup, index); in VisitArrayInitLoopExpr()
1862 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); in VisitDesignatedInitUpdateExpr()
1874 static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { in GetNumNonZeroBytesInInit() argument
1877 E = E->IgnoreParenNoopCasts(CGF.getContext()); in GetNumNonZeroBytesInInit()
1880 if (isSimpleZero(E, CGF)) return CharUnits::Zero(); in GetNumNonZeroBytesInInit()
1887 if (!ILE || !CGF.getTypes().isZeroInitializable(ILE->getType())) in GetNumNonZeroBytesInInit()
1888 return CGF.getContext().getTypeSizeInChars(E->getType()); in GetNumNonZeroBytesInInit()
1902 GetNumNonZeroBytesInInit(ILE->getInit(ILEElement++), CGF); in GetNumNonZeroBytesInInit()
1916 NumNonZeroBytes += CGF.getContext().toCharUnitsFromBits( in GetNumNonZeroBytesInInit()
1917 CGF.getTarget().getPointerWidth(0)); in GetNumNonZeroBytesInInit()
1919 NumNonZeroBytes += GetNumNonZeroBytesInInit(E, CGF); in GetNumNonZeroBytesInInit()
1929 NumNonZeroBytes += GetNumNonZeroBytesInInit(ILE->getInit(i), CGF); in GetNumNonZeroBytesInInit()
1937 CodeGenFunction &CGF) { in CheckAggExprForMemSetUse() argument
1944 if (CGF.getLangOpts().CPlusPlus) in CheckAggExprForMemSetUse()
1945 if (const RecordType *RT = CGF.getContext() in CheckAggExprForMemSetUse()
1953 CharUnits Size = Slot.getPreferredSize(CGF.getContext(), E->getType()); in CheckAggExprForMemSetUse()
1959 CharUnits NumNonZeroBytes = GetNumNonZeroBytesInInit(E, CGF); in CheckAggExprForMemSetUse()
1964 llvm::Constant *SizeVal = CGF.Builder.getInt64(Size.getQuantity()); in CheckAggExprForMemSetUse()
1967 Loc = CGF.Builder.CreateElementBitCast(Loc, CGF.Int8Ty); in CheckAggExprForMemSetUse()
1968 CGF.Builder.CreateMemSet(Loc, CGF.Builder.getInt8(0), SizeVal, false); in CheckAggExprForMemSetUse()