Lines Matching defs:variable

167   // If an equivalent block descriptor global variable exists, return it.
175 // If there isn't an equivalent block descriptor global variable, create a new
456 // We can only do this if the variable is const.
467 // If the variable doesn't have any initializer (shouldn't this be
539 // If the variable is captured by an enclosing block or lambda expression,
545 // If the captured variable is a non-escaping __block variable, the field
546 // type is the reference type. If the variable is a __block variable that
547 // already has a reference type, the field type is the variable's type.
604 const VarDecl *variable = CI.getVariable();
611 // Since a __block variable cannot be captured by lambdas, its type and
613 assert(CGF && getCaptureFieldType(*CGF, CI) == variable->getType() &&
614 "capture type differs from the variable type");
616 variable->getType(), layout, info, CGM);
622 if (llvm::Constant *constant = tryCaptureAsConstant(CGM, CGF, variable)) {
639 CharUnits align = C.getDeclAlign(variable);
746 // an over-aligned variable. We will be adding a padding field to
771 // The block literal is emitted as a global variable, and the block invoke
899 const VarDecl *variable = CI.getVariable();
900 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
923 BlockInfo->getCapture(variable);
930 auto I = LocalDeclMap.find(variable);
935 DeclRefExpr declRef(getContext(), const_cast<VarDecl *>(variable),
973 // If it's a reference variable, copy the reference into the block field.
984 // If this is an ARC __strong block-pointer variable, don't do a
989 // variable, because the local variable's lifetime should be strictly
1002 // Fake up a new variable so that EmitScalarInit doesn't think
1003 // we're referring to the variable in its own initializer.
1009 DeclRefExpr declRef(getContext(), const_cast<VarDecl *>(variable),
1226 Address CodeGenFunction::GetAddrOfBlockDecl(const VarDecl *variable) {
1228 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1231 if (capture.isConstant()) return LocalDeclMap.find(variable)->second;
1236 if (variable->isEscapingByref()) {
1240 auto &byrefInfo = getBlockByrefInfo(variable);
1245 variable->getName());
1248 assert((!variable->isNonEscapingByref() ||
1250 "the capture field of a non-escaping variable should have a "
1390 // Allocate a stack slot like for any local variable to guarantee optimal
1453 // For OpenCL passed block pointer can be private AS local variable or
1454 // global AS program scope variable (for the case with and without captures).
1525 const VarDecl *variable = CI.getVariable();
1526 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1529 CharUnits align = getContext().getDeclAlign(variable);
1531 CreateMemTemp(variable->getType(), align, "block.captured-const");
1535 setAddrOfLocalVar(variable, alloca);
1565 const VarDecl *variable = CI.getVariable();
1566 DI->EmitLocation(Builder, variable->getLocation());
1569 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1571 auto addr = LocalDeclMap.find(variable)->second;
1573 variable, addr.emitRawPointer(*this), Builder);
1578 variable, BlockPointerDbgLoc, Builder, blockInfo,
1661 /// Release a __block variable.
1877 /// the contents of an individual __block variable to the heap.
1942 assert(CI.getCopyExpr() && "copy expression for variable is missing");
2066 /// variable.
2172 /// Emits the copy/dispose helpers for an ARC __block __weak variable.
2192 /// Emits the copy/dispose helpers for an ARC __block __strong variable
2201 // variable.
2229 /// variable that's of block-pointer type.
2255 /// Emits the copy/dispose helpers for a __block variable with a
2284 /// Emits the copy/dispose helpers for a __block variable that is a non-trivial
2373 /// Build the copy helper for a __block variable.
2381 /// Generate code for a __block variable's dispose helper.
2429 /// Build the dispose helper for a __block variable.
2437 /// Lazily build the copy and dispose helpers for a __block variable
2458 /// Build the copy and dispose helpers for the given __block variable
2571 /// BuildByrefInfo - This routine changes a __block variable declared as T x
2672 /// Initialize the structural components of a __block variable, i.e.
2712 // Store the address of the variable into its own forwarding pointer.
2741 printf("\n Inline flag for BYREF variable layout (%d):", flags.getBitMask());