diff options
author | John McCall <rjmccall@apple.com> | 2011-11-09 03:17:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-09 03:17:26 +0000 |
commit | a59e4b7fca1d46afd8f315fa87fa8bf1a68df9cd (patch) | |
tree | 9d0a7294cc8cca8a6169fc71fe3a9b9744a3efb9 /lib/CodeGen/CGDebugInfo.cpp | |
parent | d3891e9fb7eb25436e5c537189030bed0d5a1dcf (diff) |
Emit the copy and dipose helpers for ARC __strong
block-typed __block variables using objc_retainBlock
and objc_dispose. Previously we were using
_Block_object_assign and _Block_object_destroy
with BLOCK_BYREF_CALLER, which causes the runtime
to completely ignore the retain and release.
In most cases this doesn't cause catastrophe
because the retain/release are balanced and
because the block in the variable was copied
upon assignment there. However, the stack
copy of the variable will be released when
it goes out of scope, which is a problem if
that value was released due to an assignment
to the heap copy. Similarly, a leak can occur
if the variable is assigned after the copy to
the heap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
0 files changed, 0 insertions, 0 deletions