Home | History | Annotate | Download | only in CodeGen

Lines Matching full:capture

190   /// A chunk of data that we actually have to capture in the block.
195 const BlockDecl::Capture *Capture; // null for 'this'
200 const BlockDecl::Capture *capture,
203 Capture(capture), Type(type) {}
207 if (!Capture) {
211 info.Captures.insert({Capture->getVariable(),
212 CGBlockInfo::Capture::makeIndex(index, offset)});
224 if (chunk.Capture && chunk.Capture->isByRef())
237 /// Determines if the given type is safe for constant capture in C++.
279 // invalid?), it's not clear what we should do. Maybe capture as
344 "Can't capture 'this' outside a method");
380 info.Captures[variable] = CGBlockInfo::Capture::makeConstant(constant);
384 // If we have a lifetime qualifier, honor it for capture purposes.
589 CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
590 if (capture.isConstant()) continue;
609 capture.getIndex(),
610 capture.getOffset());
625 capture.setCleanup(CGF.EHStack.stable_begin());
697 // If there is nothing to capture, we can emit this as a global block.
750 // Finally, capture all the values into the block.
763 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
766 if (capture.isConstant()) continue;
773 projectField(capture.getIndex(), capture.getOffset(), "block.captured");
779 // We need to use the capture from the enclosing block.
780 const CGBlockInfo::Capture &enclosingCapture =
787 "block.capture.addr");
789 // The lambda capture in a lambda's conversion-to-block-pointer is
816 byrefPointer = Builder.CreateLoad(src, "byref.capture");
820 // Write that void* into the capture field.
885 EHScopeStack::stable_iterator cleanup = capture.getCleanup();
1002 const CGBlockInfo::Capture &capture = BlockInfo->getCapture(variable);
1005 if (capture.isConstant()) return LocalDeclMap.find(variable)->second;
1008 Builder.CreateStructGEP(LoadBlockStruct(), capture.getIndex(),
1009 capture.getOffset(), "block.capture.addr");
1224 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1225 if (!capture.isConstant()) continue;
1231 Builder.CreateStore(capture.getConstant(), alloca);
1265 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1266 if (capture.isConstant()) {
1297 note.index = capture.getIndex();
1376 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1377 if (capture.isConstant()) continue;
1430 unsigned index = capture.getIndex();
1431 Address srcField = Builder.CreateStructGEP(src, index, capture.getOffset());
1432 Address dstField = Builder.CreateStructGEP(dst, index, capture.getOffset());
1549 const CGBlockInfo::Capture &capture = blockInfo.getCapture(variable);
1550 if (capture.isConstant()) continue;
1596 Builder.CreateStructGEP(src, capture.getIndex(), capture.getOffset());
1602 // If this is a __weak capture, emit the release directly.