]> granicus.if.org Git - clang/commit
[CodeGen][ObjC] Annotate retain-agnostic ObjC globals with attribute
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 14 Jun 2019 22:06:28 +0000 (22:06 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 14 Jun 2019 22:06:28 +0000 (22:06 +0000)
commite870496ea61feb01aa0eb4dc599be0ddf2d03878
treeccf874a6e9bd13937461d49f9cd090b1410a3ecc
parentdf6a97d185f4e7ac0ea672db9c63b2273cc84cf8
[CodeGen][ObjC] Annotate retain-agnostic ObjC globals with attribute
'objc_arc_inert'

The attribute enables the ARC optimizer to delete ObjC ARC runtime calls
on the annotated globals (see https://reviews.llvm.org/D62433). We
currently only annotate global variables for string literals and global
blocks with the attribute.

rdar://problem/49839633

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363467 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCXX/static-local-in-local-class.cpp
test/CodeGenObjC/attr-objc-arc-inert.m [new file with mode: 0644]