[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
authorAkira Hatanaka <ahatanaka@apple.com>
Wed, 10 Apr 2019 06:20:23 +0000 (06:20 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 10 Apr 2019 06:20:23 +0000 (06:20 +0000)
commit60c3a3b6d0f18a0deb226c545251f83d167e087a
treee558ee2749dc136995b3ea1dfd36f3ef036d0d69
parent9ca9d32b6be038debc6fda9c16a5f95b59e9b806
[CodeGen][ObjC] Emit the retainRV marker as a module flag instead of
named metadata.

This fixes a bug where ARC contract wasn't inserting the retainRV
marker when LTO was enabled, which caused objects returned from a
function to be auto-released.

rdar://problem/49464214

Differential Revision: https://reviews.llvm.org/D60302

llvm-svn: 358048
clang/lib/CodeGen/CGObjC.cpp
clang/test/CodeGenObjC/arc-unsafeclaim.m