]> granicus.if.org Git - clang/commit
[CodeGen][ObjC] Emit @objc_retain at -O0 for variables captured by
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 9 May 2017 01:20:05 +0000 (01:20 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Tue, 9 May 2017 01:20:05 +0000 (01:20 +0000)
commit7f0162dff041f0277a6ef0ab38842ad93731f4fc
tree102f1346500cbd112cbebaa40c839b30f74a3da2
parent5a83b3867c31a5a87c1d938bcb107a8d7a36bfd7
[CodeGen][ObjC] Emit @objc_retain at -O0 for variables captured by
blocks.

r302270 made changes to avoid emitting clang.arc.use at -O0 and instead
emit @objc_release. We also have to emit @objc_retain for the captured
variable at -O0 to match the @objc_release instead of just storing the
pointer to the capture field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302495 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjC/arc-foreach.m