summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-diff/DiffConsumer.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-11-09 03:17:26 +0000
committerJohn McCall <rjmccall@apple.com>2011-11-09 03:17:26 +0000
commit3a237aa31ca3add00459a3c029479e3d34b645b0 (patch)
treeb7bc9b9c900ac410f6230bb70e1e7b03365f1a47 /llvm/tools/llvm-diff/DiffConsumer.cpp
parent68b8fad7d25755d8edc41eab6dfa734c18162bed (diff)
downloadbcm5719-llvm-3a237aa31ca3add00459a3c029479e3d34b645b0.tar.gz
bcm5719-llvm-3a237aa31ca3add00459a3c029479e3d34b645b0.zip
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. llvm-svn: 144162
Diffstat (limited to 'llvm/tools/llvm-diff/DiffConsumer.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud