[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 11:50:30 PDT 2018


ahatanak updated this revision to Diff 156332.
ahatanak added a comment.

Fix a bug where the capture cleanups weren't pushed when BlockDecl::doesNotEscape() returns true.

Test that, when ARC is enabled, captures are retained and copied into the stack block object and destroyed when the stack block object goes out of scope.


Repository:
  rC Clang

https://reviews.llvm.org/D49303

Files:
  docs/Block-ABI-Apple.rst
  lib/CodeGen/CGBlocks.cpp
  lib/CodeGen/CGBlocks.h
  test/CodeGenObjC/noescape.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49303.156332.patch
Type: text/x-patch
Size: 7826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180719/e5a5d65b/attachment.bin>


More information about the cfe-commits mailing list