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) {
99 blockInfo.BlockSize.getQuantity()));
102 if (blockInfo.NeedsCopyDispose) {
104 elements.push_back(buildCopyHelper(CGM, blockInfo));
107 elements.push_back(buildDisposeHelper(CGM, blockInfo));
112 CGM.getContext().getObjCEncodingForBlock(blockInfo.getBlockExpr());
119 elements.push_back(CGM.getObjCRuntime().BuildGCBlockLayout(CGM, blockInfo));
121 elements.push_back(CGM.getObjCRuntime().BuildRCBlockLayout(CGM, blockInfo));
561 CGBlockInfo &blockInfo =
563 blockInfo.NextBlockInfo = CGF.FirstBlockInfo;
564 CGF.FirstBlockInfo = &blockInfo;
568 computeBlockInfo(CGF.CGM, &CGF, blockInfo);
571 if (blockInfo.CanBeGlobal) return;
574 blockInfo.LocalAddress = CGF.CreateTempAlloca(blockInfo.StructureType,
575 blockInfo.BlockAlign, "block");
578 if (!blockInfo.NeedsCopyDispose) return;
589 CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
608 Address addr = CGF.Builder.CreateStructGEP(blockInfo.LocalAddress,
613 if (!blockInfo.DominatingIP)
614 blockInfo.DominatingIP = cast<llvm::Instruction>(addr.getPointer());
673 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), CurFn->getName());
674 computeBlockInfo(CGM, this, blockInfo);
675 blockInfo.BlockExpression = blockExpr;
676 return EmitBlockLiteral(blockInfo);
680 std::unique_ptr<CGBlockInfo> blockInfo;
681 blockInfo.reset(findAndRemoveBlockInfo(&FirstBlockInfo,
684 blockInfo->BlockExpression = blockExpr;
685 return EmitBlockLiteral(*blockInfo);
688 llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
690 bool isLambdaConv = blockInfo.getBlockDecl()->isConversionFromLambda();
692 = CodeGenFunction(CGM, true).GenerateBlockFunction(CurGD, blockInfo,
698 if (blockInfo.CanBeGlobal)
699 return buildGlobalBlock(CGM, blockInfo, blockFn);
707 llvm::Constant *descriptor = buildBlockDescriptor(CGM, blockInfo);
709 Address blockAddr = blockInfo.LocalAddress;
714 if (blockInfo.HasCapturedVariableLayout) flags |= BLOCK_HAS_EXTENDED_LAYOUT;
715 if (blockInfo.NeedsCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE;
716 if (blockInfo.HasCXXObject) flags |= BLOCK_HAS_CXX_OBJ;
717 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
751 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
755 Address addr = projectField(blockInfo.CXXThisIndex, blockInfo.CXXThisOffset,
763 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
778 if (BlockInfo && CI.isNested()) {
781 BlockInfo->getCapture(variable);
887 ActivateCleanupBlock(cleanup, blockInfo.DominatingIP);
895 ConvertType(blockInfo.getBlockExpr()->getType()));
1001 assert(BlockInfo && "evaluating block ref without block information?");
1002 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1035 CGBlockInfo blockInfo(blockExpr->getBlockDecl(), name);
1036 blockInfo.BlockExpression = blockExpr;
1039 computeBlockInfo(*this, nullptr, blockInfo);
1046 blockInfo,
1052 return buildGlobalBlock(*this, blockInfo, blockFn);
1056 const CGBlockInfo &blockInfo,
1058 assert(blockInfo.CanBeGlobal);
1068 if (blockInfo.UsesStret) flags |= BLOCK_USE_STRET;
1079 fields[4] = buildBlockDescriptor(CGM, blockInfo);
1090 literal->setAlignment(blockInfo.BlockAlign.getQuantity());
1094 CGM.getTypes().ConvertType(blockInfo.getBlockExpr()->getType());
1101 assert(BlockInfo && "not emitting prologue of block invocation function?!");
1115 DI->EmitDeclareOfBlockLiteralArgVariable(*BlockInfo, arg, argNum,
1120 SourceLocation StartLoc = BlockInfo->getBlockExpr()->getBody()->getLocStart();
1126 BlockInfo->StructureType->getPointerTo(),
1131 assert(BlockInfo && "not in a block invocation function!");
1133 return Address(BlockPointer, BlockInfo->BlockAlign);
1138 const CGBlockInfo &blockInfo,
1141 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1145 CurEHLocation = blockInfo.getBlockExpr()->getLocEnd();
1147 BlockInfo = &blockInfo;
1176 const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType();
1181 blockInfo.UsesStret = true;
1193 blockInfo.getBlockExpr()->getBody()->getLocStart());
1216 Builder.CreateStructGEP(LoadBlockStruct(), blockInfo.CXXThisIndex,
1217 blockInfo.CXXThisOffset, "block.captured-this");
1224 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1265 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1274 variable, BlockPointerDbgLoc, Builder, blockInfo,
1321 CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
1360 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1363 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign);
1367 dst = Address(Builder.CreateLoad(dst), blockInfo.BlockAlign);
1370 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1376 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1500 CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
1535 llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo();
1538 src = Address(Builder.CreateLoad(src), blockInfo.BlockAlign);
1541 const BlockDecl *blockDecl = blockInfo.getBlockDecl();
1549 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);