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