Lines Matching full:cgf
432 void Emit(CodeGenFunction &CGF, Flags flags) override {
437 CGF.emitDestroy(addr, type, destroyer, useEHCleanupForArray);
451 void Emit(CodeGenFunction &CGF, Flags flags) override {
458 llvm::BasicBlock *RunDtorBB = CGF.createBasicBlock("nrvo.unused");
459 SkipDtorBB = CGF.createBasicBlock("nrvo.skipdtor");
461 CGF.Builder.CreateFlagLoad(NRVOFlag, "nrvo.val");
462 CGF.Builder.CreateCondBr(DidNRVO, SkipDtorBB, RunDtorBB);
463 CGF.EmitBlock(RunDtorBB);
466 CGF.EmitCXXDestructorCall(Dtor, Dtor_Complete,
471 if (NRVO) CGF.EmitBlock(SkipDtorBB);
478 void Emit(CodeGenFunction &CGF, Flags flags) override {
479 llvm::Value *V = CGF.Builder.CreateLoad(Stack);
480 llvm::Value *F = CGF.CGM.getIntrinsic(llvm::Intrinsic::stackrestore);
481 CGF.Builder.CreateCall(F, V);
489 void Emit(CodeGenFunction &CGF, Flags flags) override {
494 llvm::Value *value = CGF.EmitLoadOfScalar(CGF.EmitDeclRefLValue(&DRE),
496 CGF.EmitExtendGCLifetime(value);
509 void Emit(CodeGenFunction &CGF, Flags flags) override {
514 llvm::Value *Addr = CGF.EmitDeclRefLValue(&DRE).getPointer();
524 CGF.Builder.CreateBitCast(Addr, CGF.ConvertType(ArgTy));
528 CGF.getContext().getPointerType(Var.getType()));
529 CGF.EmitCall(FnInfo, CleanupFn, ReturnValueSlot(), Args);
536 static void EmitAutoVarWithLifetime(CodeGenFunction &CGF, const VarDecl &var,
553 CleanupKind cleanupKind = CGF.getARCCleanupKind();
554 CGF.pushDestroy(cleanupKind, addr, var.getType(), destroyer,
565 CGF.pushDestroy(NormalAndEHCleanup, addr, var.getType(),
604 static bool tryEmitARCCopyWeakInit(CodeGenFunction &CGF,
625 LValue srcLV = CGF.EmitLValue(srcExpr);
630 srcAddr = CGF.Builder.CreateElementBitCast(srcAddr,
636 CGF.EmitARCCopyWeak(destLV.getAddress(), srcAddr);
639 CGF.EmitARCMoveWeak(destLV.getAddress(), srcAddr);
654 static void drillIntoBlockVariable(CodeGenFunction &CGF,
657 lvalue.setAddress(CGF.emitBlockByrefAddress(lvalue.getAddress(), var));
1597 static void emitPartialArrayDestroy(CodeGenFunction &CGF,
1603 while (const ArrayType *arrayType = CGF.getContext().getAsArrayType(type)) {
1611 llvm::Value *zero = llvm::ConstantInt::get(CGF.SizeTy, 0);
1614 begin = CGF.Builder.CreateInBoundsGEP(begin, gepIndices, "pad.arraybegin");
1615 end = CGF.Builder.CreateInBoundsGEP(end, gepIndices, "pad.arrayend");
1621 CGF.emitArrayDestroy(begin, end, type, elementAlign, destroyer,
1643 void Emit(CodeGenFunction &CGF, Flags flags) override {
1644 emitPartialArrayDestroy(CGF, ArrayBegin, ArrayEnd,
1668 void Emit(CodeGenFunction &CGF, Flags flags) override {
1669 llvm::Value *arrayEnd = CGF.Builder.CreateLoad(ArrayEndPointer);
1670 emitPartialArrayDestroy(CGF, ArrayBegin, arrayEnd,
1739 void Emit(CodeGenFunction &CGF, Flags flags) override {
1740 CGF.EmitARCRelease(Param, Precise);
1875 CodeGenFunction *CGF) {
1878 getOpenMPRuntime().emitUserDefinedReduction(CGF, D);