[PATCH] D49718: [CodeGen][ObjC] Make block copy/dispose helper function exception-safe.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 24 15:49:22 PDT 2018
ahatanak updated this revision to Diff 157149.
ahatanak added a comment.
Merge pushBlockObjectRelease and enterByrefCleanup.
In https://reviews.llvm.org/D49718#1174113, @rjmccall wrote:
> Heh, okay. It looks like the runtime doesn't do anything different, but I think it's probably more correct to always pass `BLOCK_FIELD_IS_WEAK` when destroying a `__weak` block in GC modes.
I tried passing `BLOCK_FIELD_IS_WEAK | BLOCK_FIELD_IS_BYREF` to the call to enterByrefCleanup in EmitAutoVarCleanups, but it looks like test/CodeGenObjC/blocks.m fails if I do so. The test was committed in r125823 and there is a comment that says " We're not supposed to pass BLOCK_FIELD_IS_WEAK here".
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20110214/038996.html
Should we change the check in the test?
Repository:
rC Clang
https://reviews.llvm.org/D49718
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenObjCXX/arc-blocks.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49718.157149.patch
Type: text/x-patch
Size: 18559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180724/b5d5a40c/attachment-0001.bin>
More information about the cfe-commits
mailing list