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);
75 const CGBlockInfo &blockInfo) {
91 blockInfo.BlockSize.getQuantity()));
94 if (blockInfo.NeedsCopyDispose) {
96 elements.push_back(buildCopyHelper(CGM, blockInfo));
99 elements.push_back(buildDisposeHelper(CGM, blockInfo));
104 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr());
111 elements.push_back(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo));
113 elements.push_back(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo));
565 CGBlockInfo &blockInfo =
567 blockInfo.NextBlockInfo = CGF.FirstBlockInfo;
568 CGF.FirstBlockInfo = &blockInfo;
572 computeBlockInfo(CGF.CGM, &CGF, blockInfo);
575 if (blockInfo.CanBeGlobal) return;
578 blockInfo.Address =
579 CGF.CreateTempAlloca(blockInfo.StructureType, "block");
580 blockInfo.Address->setAlignment(blockInfo.BlockAlign.getQuantity());
583 if (!blockInfo.NeedsCopyDispose) return;
595 CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
614 llvm::Value *addr = CGF.Builder.CreateStructGEP(blockInfo.Address,
618 if (!blockInfo.DominatingIP)
619 blockInfo.DominatingIP = cast<llvm::Instruction>(addr);
678 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName());
679 computeBlockInfo(CGM, this, blockInfo);
680 blockInfo.BlockExpression = blockExpr;
681 return EmitBlockLiteral(blockInfo);
685 OwningPtr<CGBlockInfo> blockInfo;
686 blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo,
689 blockInfo->BlockExpression = blockExpr;
690 return EmitBlockLiteral(*blockInfo);
693 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
695 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda();
697 = CodeGenFunction(CGM, true).GenerateBlockFunction(CurGD, blockInfo,
703 if (blockInfo.CanBeGlobal)
704 return buildGlobalBlock(CGM, blockInfo, blockFn);
712 llvm::Constant *descriptor = buildBlockDescriptor(CGM, blockInfo);
714 llvm::AllocaInst *blockAddr = blockInfo.Address;
719 if (blockInfo.HasCapturedVariableLayout) flags |= BLOCK_HAS_EXTENDED_LAYOUT;
720 if (blockInfo.NeedsCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE;
721 if (blockInfo.HasCXXObject) flags |= BLOCK_HAS_CXX_OBJ;
722 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
736 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
741 blockInfo.CXXThisIndex,
750 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
766 if (BlockInfo && ci->isNested()) {
769 BlockInfo->getCapture(variable);
851 ActivateCleanupBlock(cleanup, blockInfo.DominatingIP);
859 ConvertType(blockInfo.getBlockExpr()->getType()));
966 assert(BlockInfo && "evaluating block ref without block information?");
967 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1005 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), name);
1006 blockInfo.BlockExpression = blockExpr;
1009 computeBlockInfo(*this, 0, blockInfo);
1016 blockInfo,
1022 return buildGlobalBlock(*this, blockInfo, blockFn);
1026 const CGBlockInfo &blockInfo,
1028 assert(blockInfo.CanBeGlobal);
1038 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
1049 fields[4] = buildBlockDescriptor(CGM, blockInfo);
1060 literal->setAlignment(blockInfo.BlockAlign.getQuantity());
1064 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType());
1070 const CGBlockInfo &blockInfo,
1074 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1080 BlockInfo = &blockInfo;
1111 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType();
1117 blockInfo.UsesStret = true;
1130 blockInfo.getBlockExpr()->getBody()->getLocStart());
1139 blockInfo.StructureType->getPointerTo(),
1146 blockInfo.CXXThisIndex,
1158 if (blockInfo.Captures.count(self)) {
1159 const CGBlockInfo::Capture &capture = blockInfo.getCapture(self);
1185 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1226 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1234 Builder, blockInfo);
1281 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
1319 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1329 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1336 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1459 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
1493 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1499 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1508 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);