Lines Matching defs:Variable
201 // If an equivalent block descriptor global variable exists, return it.
210 // If there isn't an equivalent block descriptor global variable, create a new
422 // We can only do this if the variable is const.
433 // If the variable doesn't have any initializer (shouldn't this be
507 // If the variable is captured by an enclosing block or lambda expression,
513 // If the captured variable is a non-escaping __block variable, the field
514 // type is the reference type. If the variable is a __block variable that
515 // already has a reference type, the field type is the variable's type.
570 const VarDecl *variable = CI.getVariable();
580 // Since a __block variable cannot be captured by lambdas, its type and
582 assert(CGF && getCaptureFieldType(*CGF, CI) == variable->getType() &&
583 "capture type differs from the variable type");
586 CGM.VoidPtrTy, variable->getType()));
592 if (llvm::Constant *constant = tryCaptureAsConstant(CGM, CGF, variable)) {
593 info.Captures[variable] = CGBlockInfo::Capture::makeConstant(constant);
652 CharUnits align = C.getDeclAlign(variable);
758 // an over-aligned variable. We will be adding a padding field to
782 // The block literal is emitted as a global variable, and the block invoke
911 const VarDecl *variable = CI.getVariable();
912 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
935 BlockInfo->getCapture(variable);
942 auto I = LocalDeclMap.find(variable);
947 DeclRefExpr declRef(getContext(), const_cast<VarDecl *>(variable),
985 // If it's a reference variable, copy the reference into the block field.
996 // If this is an ARC __strong block-pointer variable, don't do a
1001 // variable, because the local variable's lifetime should be strictly
1014 // Fake up a new variable so that EmitScalarInit doesn't think
1015 // we're referring to the variable in its own initializer.
1021 DeclRefExpr declRef(getContext(), const_cast<VarDecl *>(variable),
1245 Address CodeGenFunction::GetAddrOfBlockDecl(const VarDecl *variable) {
1247 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1250 if (capture.isConstant()) return LocalDeclMap.find(variable)->second;
1255 if (variable->isEscapingByref()) {
1259 auto &byrefInfo = getBlockByrefInfo(variable);
1266 variable->getName());
1269 assert((!variable->isNonEscapingByref() ||
1271 "the capture field of a non-escaping variable should have a "
1408 // Allocate a stack slot like for any local variable to guarantee optimal
1473 // For OpenCL passed block pointer can be private AS local variable or
1474 // global AS program scope variable (for the case with and without captures).
1545 const VarDecl *variable = CI.getVariable();
1546 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1549 CharUnits align = getContext().getDeclAlign(variable);
1551 CreateMemTemp(variable->getType(), align, "block.captured-const");
1555 setAddrOfLocalVar(variable, alloca);
1582 const VarDecl *variable = CI.getVariable();
1583 DI->EmitLocation(Builder, variable->getLocation());
1586 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1588 auto addr = LocalDeclMap.find(variable)->second;
1589 (void)DI->EmitDeclareOfAutoVariable(variable, addr.getPointer(),
1595 variable, BlockPointerDbgLoc, Builder, blockInfo,
1681 const VarDecl *Variable = CI.getVariable();
1682 const CGBlockInfo::Capture &Capture = BlockInfo.getCapture(Variable);
1701 /// Release a __block variable.
1916 /// the contents of an individual __block variable to the heap.
1991 assert(CI.getCopyExpr() && "copy expression for variable is missing");
2113 /// variable.
2230 /// Emits the copy/dispose helpers for an ARC __block __weak variable.
2250 /// Emits the copy/dispose helpers for an ARC __block __strong variable
2259 // variable.
2287 /// variable that's of block-pointer type.
2313 /// Emits the copy/dispose helpers for a __block variable with a
2342 /// Emits the copy/dispose helpers for a __block variable that is a non-trivial
2441 /// Build the copy helper for a __block variable.
2449 /// Generate code for a __block variable's dispose helper.
2504 /// Build the dispose helper for a __block variable.
2512 /// Lazily build the copy and dispose helpers for a __block variable
2533 /// Build the copy and dispose helpers for the given __block variable
2539 const VarDecl &var = *emission.Variable;
2645 /// BuildByrefInfo - This routine changes a __block variable declared as T x
2746 /// Initialize the structural components of a __block variable, i.e.
2770 const VarDecl &D = *emission.Variable;
2787 // Store the address of the variable into its own forwarding pointer.
2815 printf("\n Inline flag for BYREF variable layout (%d):", flags.getBitMask());