reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
43 return CGF.CreateAggTemp(T, "agg.tmp.ensured"); 47 Dest = CGF.CreateAggTemp(T, "agg.tmp.ensured"); 61 : CGF(cgf), Builder(CGF.Builder), Dest(Dest), 92 if (CGF.getLangOpts().getGC() && TypeRequiresGCollection(T)) 104 ApplyDebugLocation DL(CGF, E); 109 CGF.ErrorUnsupported(S, "aggregate expression"); 116 CGF.EmitCoawaitExpr(*E, Dest, IsResultUnused); 119 CGF.EmitCoyieldExpr(*E, Dest, IsResultUnused); 171 CodeGenFunction::CXXDefaultArgExprScope Scope(CGF, DAE); 175 CodeGenFunction::CXXDefaultInitExprScope Scope(CGF, DIE); 191 LValue LV = CGF.EmitPseudoObjectLValue(E); 195 CGF.EmitPseudoObjectRValue(E, EnsureSlot(E->getType())); 203 void VisitCXXThrowExpr(const CXXThrowExpr *E) { CGF.EmitCXXThrowExpr(E); } 205 RValue Res = CGF.EmitAtomicExpr(E); 219 LValue LV = CGF.EmitLValue(E); 222 if (LV.getType()->isAtomicType() || CGF.LValueIsSuitableForInlineAtomic(LV)) { 223 CGF.EmitAtomicLoad(LV, E->getExprLoc(), Dest); 271 RetAddr = CGF.CreateMemTemp(RetTy, "tmp", &RetAllocaAddr); 273 CGF.CGM.getDataLayout().getTypeAllocSize(CGF.ConvertTypeForMem(RetTy)); 273 CGF.CGM.getDataLayout().getTypeAllocSize(CGF.ConvertTypeForMem(RetTy)); 274 LifetimeSizePtr = CGF.EmitLifetimeStart(Size, RetAllocaAddr.getPointer()); 282 CGF.pushFullExprCleanup<CodeGenFunction::CallLifetimeEnd>( 284 LifetimeEndBlock = CGF.EHStack.stable_begin(); 292 CGF.pushDestroy(RetTy.isDestructedType(), Src.getAggregateAddress(), RetTy); 304 CGF.DeactivateCleanupBlock(LifetimeEndBlock, LifetimeStartInst); 305 CGF.EmitLifetimeEnd(LifetimeSizePtr, RetAllocaAddr.getPointer()); 312 LValue srcLV = CGF.MakeAddrLValue(src.getAggregateAddress(), type); 327 LValue DstLV = CGF.MakeAddrLValue( 333 CGF.callCStructMoveAssignmentOperator(DstLV, src); 335 CGF.callCStructMoveConstructor(DstLV, src); 341 CGF.callCStructCopyAssignmentOperator(DstLV, src); 343 CGF.callCStructCopyConstructor(DstLV, src); 362 CharUnits sz = dest.getPreferredSize(CGF.getContext(), type); 363 llvm::Value *size = llvm::ConstantInt::get(CGF.SizeTy, sz.getQuantity()); 364 CGF.CGM.getObjCRuntime().EmitGCMemmoveCollectable(CGF, 364 CGF.CGM.getObjCRuntime().EmitGCMemmoveCollectable(CGF, 374 LValue DestLV = CGF.MakeAddrLValue(dest.getAddress(), type); 375 LValue SrcLV = CGF.MakeAddrLValue(src.getAddress(), type); 376 CGF.EmitAggregateCopy(DestLV, SrcLV, type, dest.mayOverlap(), 386 ASTContext &Ctx = CGF.getContext(); 387 LValue Array = CGF.EmitLValue(E->getSubExpr()); 399 CGF.ErrorUnsupported(E, "weird std::initializer_list"); 407 CGF.ErrorUnsupported(E, "weird std::initializer_list"); 412 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); 413 LValue Start = CGF.EmitLValueForFieldInitialization(DestLV, *Field); 414 llvm::Value *Zero = llvm::ConstantInt::get(CGF.PtrDiffTy, 0); 418 CGF.EmitStoreThroughLValue(RValue::get(ArrayStart), Start); 422 CGF.ErrorUnsupported(E, "weird std::initializer_list"); 427 LValue EndOrLength = CGF.EmitLValueForFieldInitialization(DestLV, *Field); 435 CGF.EmitStoreThroughLValue(RValue::get(ArrayEnd), EndOrLength); 438 CGF.EmitStoreThroughLValue(RValue::get(Size), EndOrLength); 440 CGF.ErrorUnsupported(E, "weird std::initializer_list"); 477 CGF.getContext().getAsArrayType(ArrayQTy)->getElementType(); 481 llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0); 486 CharUnits elementSize = CGF.getContext().getTypeSizeInChars(elementType); 494 elementType.isTriviallyCopyableType(CGF.getContext())) { 495 CodeGen::CodeGenModule &CGM = CGF.CGM; 508 EmitFinalDestCopy(ArrayQTy, CGF.MakeAddrLValue(GV, ArrayQTy, Align)); 520 if (CGF.needsEHCleanup(dtorKind)) { 525 endOfInit = CGF.CreateTempAlloca(begin->getType(), CGF.getPointerAlign(), 525 endOfInit = CGF.CreateTempAlloca(begin->getType(), CGF.getPointerAlign(), 528 CGF.pushIrregularPartialArrayCleanup(begin, endOfInit, elementType, 530 CGF.getDestroyer(dtorKind)); 531 cleanup = CGF.EHStack.stable_begin(); 538 llvm::Value *one = llvm::ConstantInt::get(CGF.SizeTy, 1); 560 CGF.MakeAddrLValue(Address(element, elementAlign), elementType); 573 CGF.getTypes().isZeroInitializable(elementType))) { 586 llvm::ConstantInt::get(CGF.SizeTy, NumArrayElements), 590 llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body"); 593 CGF.EmitBlock(bodyBB); 605 CodeGenFunction::RunCleanupsScope CleanupsScope(CGF); 607 CGF.MakeAddrLValue(Address(currentElement, elementAlign), elementType); 624 llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end"); 628 CGF.EmitBlock(endBB); 632 if (dtorKind) CGF.DeactivateCleanupBlock(cleanup, cleanupDominator); 648 EmitFinalDestCopy(e->getType(), CGF.getOrCreateOpaqueLValueMapping(e)); 654 E->getType().isPODType(CGF.getContext())) { 662 CGF.EmitAggExpr(E->getInitializer(), Slot); 682 CGF.CGM.EmitExplicitCastExprType(ECE, &CGF); 682 CGF.CGM.EmitExplicitCastExprType(ECE, &CGF); 687 LValue LV = CGF.EmitCheckedLValue(E->getSubExpr(), 691 CGF.EmitDynamicCast(LV.getAddress(), cast<CXXDynamicCastExpr>(E)); 693 CGF.CGM.ErrorUnsupported(E, "non-simple lvalue dynamic_cast"); 696 CGF.CGM.ErrorUnsupported(E, "lvalue dynamic_cast with a destination"); 703 CGF.EmitAnyExpr(E->getSubExpr(), AggValueSlot::ignored(), 711 Builder.CreateElementBitCast(Dest.getAddress(), CGF.ConvertType(Ty)); 713 CGF.MakeAddrLValue(CastPtr, Ty)); 719 CGF.EmitAnyExpr(E->getSubExpr(), AggValueSlot::ignored(), 724 LValue SourceLV = CGF.EmitLValue(E->getSubExpr()); 726 Builder.CreateElementBitCast(SourceLV.getAddress(), CGF.Int8Ty); 728 Builder.CreateElementBitCast(Dest.getAddress(), CGF.Int8Ty); 730 CGF.SizeTy, 731 CGF.getContext().getTypeSizeInChars(E->getType()).getQuantity()); 753 assert(CGF.getContext().hasSameUnqualifiedType(valueType, 758 if (Dest.isIgnored() || !CGF.CGM.isPaddedAtomicType(atomicType)) { 767 assert(CGF.getContext().hasSameUnqualifiedType(op->getType(), 777 if (!valueDest.isIgnored() && CGF.CGM.isPaddedAtomicType(atomicType)) { 781 CGF.EmitNullInitialization(Dest.getAddress(), atomicType); 785 CGF.Builder.CreateStructGEP(valueDest.getAddress(), 0); 795 CGF.EmitAggExpr(E->getSubExpr(), valueDest); 802 CGF.CreateAggTemp(atomicType, "atomic-to-nonatomic.temp"); 803 CGF.EmitAggExpr(E->getSubExpr(), atomicSlot); 826 assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(), 889 if (E->getCallReturnType(CGF.getContext())->isReferenceType()) { 895 return CGF.EmitCallExpr(E, Slot); 901 return CGF.EmitObjCMessageExpr(E, Slot); 906 CGF.EmitIgnoredExpr(E->getLHS()); 911 CodeGenFunction::StmtExprEvaluation eval(CGF); 912 CGF.EmitCompoundStmt(*E->getSubStmt(), true, Dest); 975 assert(CGF.getContext().hasSameType(E->getLHS()->getType(), 978 CGF.getContext().CompCategories.getInfoForType(E->getType()); 986 return CGF.ErrorUnsupported( 991 return CGF.ErrorUnsupported(E, "aggregate three-way comparison"); 997 RValue RV = CGF.EmitAnyExpr(E); 1009 Value *Cmp = EmitCompare(Builder, CGF, E, LHSValues.first, RHSValues.first, 1014 Value *CmpImag = EmitCompare(Builder, CGF, E, LHSValues.second, 1048 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); 1052 LValue FieldLV = CGF.EmitLValueForFieldInitialization( 1054 CGF.EmitStoreThroughLValue(RValue::get(Select), FieldLV, /*IsInit*/ true); 1063 CGF.ErrorUnsupported(E, "aggregate binary expression"); 1068 LValue LV = CGF.EmitPointerToDataMemberBinaryExpr(E); 1141 assert(CGF.getContext().hasSameUnqualifiedType(E->getLHS()->getType(), 1150 E->getRHS()->HasSideEffects(CGF.getContext())) { 1156 LValue LHS = CGF.EmitCheckedLValue(E->getLHS(), CodeGenFunction::TCK_Store); 1160 CGF.LValueIsSuitableForInlineAtomic(LHS)) { 1161 CGF.EmitAtomicStore(Dest.asRValue(), LHS, /*isInit*/ false); 1174 LValue LHS = CGF.EmitLValue(E->getLHS()); 1179 CGF.LValueIsSuitableForInlineAtomic(LHS)) { 1182 CGF.EmitAtomicStore(Dest.asRValue(), LHS, /*isInit*/ false); 1194 CGF.hasVolatileMember(E->getLHS()->getType())) 1197 CGF.EmitAggExpr(E->getRHS(), LHSSlot); 1205 llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true"); 1206 llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false"); 1207 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end"); 1210 CodeGenFunction::OpaqueValueMapping binding(CGF, E); 1212 CodeGenFunction::ConditionalEvaluation eval(CGF); 1213 CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock, 1214 CGF.getProfileCount(E)); 1219 eval.begin(CGF); 1220 CGF.EmitBlock(LHSBlock); 1221 CGF.incrementProfileCounter(E); 1223 eval.end(CGF); 1225 assert(CGF.HaveInsertPoint() && "expression evaluation ended with no IP!"); 1226 CGF.Builder.CreateBr(ContBlock); 1234 eval.begin(CGF); 1235 CGF.EmitBlock(RHSBlock); 1237 eval.end(CGF); 1239 CGF.EmitBlock(ContBlock); 1248 Address ArgPtr = CGF.EmitVAArg(VE, ArgValue); 1252 CGF.ErrorUnsupported(VE, "aggregate va_arg expression"); 1256 EmitFinalDestCopy(VE->getType(), CGF.MakeAddrLValue(ArgPtr, VE->getType())); 1272 CGF.EmitCXXTemporary(E->getTemporary(), E->getType(), Dest.getAddress()); 1278 CGF.EmitCXXConstructExpr(E, Slot); 1284 CGF.EmitInheritedCXXConstructorCall( 1292 LValue SlotLV = CGF.MakeAddrLValue(Slot.getAddress(), E->getType()); 1304 LValue LV = CGF.EmitLValueForFieldInitialization(SlotLV, *CurField); 1306 CGF.EmitLambdaVLACapture(CurField->getCapturedVLAType(), LV); 1316 if (CGF.needsEHCleanup(DtorKind)) { 1318 CleanupDominator = CGF.Builder.CreateAlignedLoad( 1319 CGF.Int8Ty, 1320 llvm::Constant::getNullValue(CGF.Int8PtrTy), 1323 CGF.pushDestroy(EHCleanup, LV.getAddress(), CurField->getType(), 1324 CGF.getDestroyer(DtorKind), false); 1325 Cleanups.push_back(CGF.EHStack.stable_begin()); 1333 CGF.DeactivateCleanupBlock(Cleanups[i-1], CleanupDominator); 1341 CGF.enterFullExpression(E); 1342 CodeGenFunction::RunCleanupsScope cleanups(CGF); 1349 EmitNullInitializationToLValue(CGF.MakeAddrLValue(Slot.getAddress(), T)); 1355 EmitNullInitializationToLValue(CGF.MakeAddrLValue(Slot.getAddress(), T)); 1393 if (Dest.isZeroed() && isSimpleZero(E, CGF)) { 1402 RValue RV = CGF.EmitReferenceBindingToExpr(E); 1403 return CGF.EmitStoreThroughLValue(RV, LV); 1406 switch (CGF.getEvaluationKind(type)) { 1408 CGF.EmitComplexExprIntoLValue(E, LV, /*isInit*/ true); 1411 CGF.EmitAggExpr(E, AggValueSlot::forLValue(LV, 1420 CGF.EmitScalarInit(E, /*D=*/nullptr, LV, /*Captured=*/false); 1422 CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV); 1422 CGF.EmitStoreThroughLValue(RValue::get(CGF.EmitScalarExpr(E)), LV); 1434 if (Dest.isZeroed() && CGF.getTypes().isZeroInitializable(type)) 1437 if (CGF.hasScalarEvaluationKind(type)) { 1439 llvm::Value *null = CGF.CGM.EmitNullConstant(type); 1443 CGF.EmitStoreThroughBitfieldLValue(RValue::get(null), lv); 1446 CGF.EmitStoreOfScalar(null, lv, /* isInitialization */ true); 1452 CGF.EmitNullInitialization(lv.getAddress(), lv.getType()); 1472 CGF.ErrorUnsupported(E, "GNU array range designator extension"); 1479 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType()); 1504 cleanupDominator = CGF.Builder.CreateAlignedLoad( 1505 CGF.Int8Ty, llvm::Constant::getNullValue(CGF.Int8PtrTy), 1505 CGF.Int8Ty, llvm::Constant::getNullValue(CGF.Int8PtrTy), 1518 Address V = CGF.GetAddressOfDirectBaseInCompleteClass( 1526 CGF.getOverlapForBaseInit(CXXRD, BaseRD, Base.isVirtual())); 1527 CGF.EmitAggExpr(E->getInit(curInitIndex++), AggSlot); 1531 CGF.pushDestroy(dtorKind, V, Base.getType()); 1532 addCleanup(CGF.EHStack.stable_begin()); 1538 CodeGenFunction::FieldConstructionScope FCS(CGF, Dest.getAddress()); 1558 LValue FieldLoc = CGF.EmitLValueForFieldInitialization(DestLV, Field); 1585 CGF.getTypes().isZeroInitializable(E->getType())) 1589 LValue LV = CGF.EmitLValueForFieldInitialization(DestLV, field); 1608 if (CGF.needsEHCleanup(dtorKind)) { 1609 CGF.pushDestroy(EHCleanup, LV.getAddress(), field->getType(), 1610 CGF.getDestroyer(dtorKind), false); 1611 addCleanup(CGF.EHStack.stable_begin()); 1630 CGF.DeactivateCleanupBlock(cleanups[i-1], cleanupDominator); 1640 CodeGenFunction::OpaqueValueMapping binding(CGF, E->getCommonExpr()); 1649 llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0); 1661 CGF.getContext().getAsArrayType(E->getType())->getElementType(); 1662 CharUnits elementSize = CGF.getContext().getTypeSizeInChars(elementType); 1667 llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body"); 1670 CGF.EmitBlock(bodyBB); 1679 if (CGF.needsEHCleanup(dtorKind) && !InnerLoop) { 1682 CGF.pushRegularPartialArrayCleanup(outerBegin, element, elementType, 1684 CGF.getDestroyer(dtorKind)); 1685 cleanup = CGF.EHStack.stable_begin(); 1694 CodeGenFunction::RunCleanupsScope CleanupsScope(CGF); 1695 CodeGenFunction::ArrayInitLoopExprScope Scope(CGF, index); 1697 CGF.MakeAddrLValue(Address(element, elementAlign), elementType); 1706 AggExprEmitter(CGF, elementSlot, false) 1714 index, llvm::ConstantInt::get(CGF.SizeTy, 1), "arrayinit.next"); 1719 nextIndex, llvm::ConstantInt::get(CGF.SizeTy, numElements), 1721 llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end"); 1724 CGF.EmitBlock(endBB); 1728 CGF.DeactivateCleanupBlock(cleanup, index); 1734 LValue DestLV = CGF.MakeAddrLValue(Dest.getAddress(), E->getType());