diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2017-04-29 00:23:11 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2017-04-29 00:23:11 +0000 |
commit | 6fdcb3c2cea9af306285867f4b4132e4149af8a6 (patch) | |
tree | 169311022210f22e48b2117825bab220d36697ab /clang/lib/Lex/Pragma.cpp | |
parent | 0aaa96a07b00b016bbe9806a888240b13da6b99f (diff) | |
download | bcm5719-llvm-6fdcb3c2cea9af306285867f4b4132e4149af8a6.tar.gz bcm5719-llvm-6fdcb3c2cea9af306285867f4b4132e4149af8a6.zip |
[ObjCARC] Do not move a release between a call and a
retainAutoreleasedReturnValue that retains the returned value.
This commit fixes a bug in ARC optimizer where it moves a release
between a call and a retainAutoreleasedReturnValue, causing the returned
object to be released before the retainAutoreleasedReturnValue can
retain it.
This commit accomplishes that by doing a lookahead and checking whether
the call prevents the release from moving upwards. In the long term, we
should treat the region between the retainAutoreleasedReturnValue and
the call as a critical section and disallow moving anything there
(possibly using operand bundles).
rdar://problem/20449878
llvm-svn: 301724
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
0 files changed, 0 insertions, 0 deletions