Lines Matching defs:blockInfo
47 const CGBlockInfo &blockInfo,
52 const CGBlockInfo &blockInfo) {
53 return CodeGenFunction(CGM).GenerateCopyHelperFunction(blockInfo);
58 const CGBlockInfo &blockInfo) {
59 return CodeGenFunction(CGM).GenerateDestroyHelperFunction(blockInfo);
77 const CGBlockInfo &blockInfo) {
93 blockInfo.BlockSize.getQuantity()));
96 if (blockInfo.NeedsCopyDispose) {
98 elements.push_back(buildCopyHelper(CGM, blockInfo));
101 elements.push_back(buildDisposeHelper(CGM, blockInfo));
106 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr());
113 elements.push_back(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo));
115 elements.push_back(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo));
560 CGBlockInfo &blockInfo =
562 blockInfo.NextBlockInfo = CGF.FirstBlockInfo;
563 CGF.FirstBlockInfo = &blockInfo;
567 computeBlockInfo(CGF.CGM, &CGF, blockInfo);
570 if (blockInfo.CanBeGlobal) return;
573 blockInfo.Address =
574 CGF.CreateTempAlloca(blockInfo.StructureType, "block");
575 blockInfo.Address->setAlignment(blockInfo.BlockAlign.getQuantity());
578 if (!blockInfo.NeedsCopyDispose) return;
589 CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
608 llvm::Value *addr = CGF.Builder.CreateStructGEP(blockInfo.Address,
612 if (!blockInfo.DominatingIP)
613 blockInfo.DominatingIP = cast<llvm::Instruction>(addr);
672 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName());
673 computeBlockInfo(CGM, this, blockInfo);
674 blockInfo.BlockExpression = blockExpr;
675 return EmitBlockLiteral(blockInfo);
679 std::unique_ptr<CGBlockInfo> blockInfo;
680 blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo,
683 blockInfo->BlockExpression = blockExpr;
684 return EmitBlockLiteral(*blockInfo);
687 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
689 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda();
691 = CodeGenFunction(CGM, true).GenerateBlockFunction(CurGD, blockInfo,
697 if (blockInfo.CanBeGlobal)
698 return buildGlobalBlock(CGM, blockInfo, blockFn);
706 llvm::Constant *descriptor = buildBlockDescriptor(CGM, blockInfo);
708 llvm::AllocaInst *blockAddr = blockInfo.Address;
713 if (blockInfo.HasCapturedVariableLayout) flags |= BLOCK_HAS_EXTENDED_LAYOUT;
714 if (blockInfo.NeedsCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE;
715 if (blockInfo.HasCXXObject) flags |= BLOCK_HAS_CXX_OBJ;
716 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
730 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
735 blockInfo.CXXThisIndex,
743 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
760 if (BlockInfo && CI.isNested()) {
763 BlockInfo->getCapture(variable);
865 ActivateCleanupBlock(cleanup, blockInfo.DominatingIP);
873 ConvertType(blockInfo.getBlockExpr()->getType()));
980 assert(BlockInfo && "evaluating block ref without block information?");
981 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1019 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), name);
1020 blockInfo.BlockExpression = blockExpr;
1023 computeBlockInfo(*this, nullptr, blockInfo);
1030 blockInfo,
1036 return buildGlobalBlock(*this, blockInfo, blockFn);
1040 const CGBlockInfo &blockInfo,
1042 assert(blockInfo.CanBeGlobal);
1052 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
1063 fields[4] = buildBlockDescriptor(CGM, blockInfo);
1074 literal->setAlignment(blockInfo.BlockAlign.getQuantity());
1078 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType());
1084 const CGBlockInfo &blockInfo,
1087 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1091 BlockInfo = &blockInfo;
1121 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType();
1126 blockInfo.UsesStret = true;
1138 blockInfo.getBlockExpr()->getBody()->getLocStart());
1146 blockInfo.StructureType->getPointerTo(),
1168 blockInfo.CXXThisIndex,
1176 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1222 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1230 Builder, blockInfo);
1277 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
1314 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1324 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1330 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1453 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
1485 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1491 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1499 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);