[PATCH] D41050: Fix over-release of return value of lambda implicitly converted to block/function pointer
Dan Zimmerman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 13 17:56:50 PST 2017
danzimm added a comment.
In https://reviews.llvm.org/D41050#954668, @rjmccall wrote:
> In https://reviews.llvm.org/D41050#953917, @danzimm wrote:
> > Change tests to use non-O2 generated IR. It looks like the combined objc_retainAutoreleasedReturnValue/objc_autoreleaseReturnValue calls annihilate each other and we just get a call/ret.
> Is that really happening at -O0? Maybe you need to add -disable-llvm-optzns to the test line if so.
Unfortunately it looks like adding `-disable-llvm-optzns` and/or `-disable-llvm-passes` (I also manually added `-O0` since I don't know what clang defaults to) doesn't generate the explicit call to `objc_retainAutoreleasedReturnValue`. Should we add a flag to disable that merging?
More information about the cfe-commits