]> granicus.if.org Git - clang/commit
[CodeGenObjC] Emit [[X alloc] init] as objc_alloc_init(X) when available
authorErik Pilkington <erik.pilkington@gmail.com>
Thu, 14 Feb 2019 19:58:37 +0000 (19:58 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Thu, 14 Feb 2019 19:58:37 +0000 (19:58 +0000)
commited91c1fa86780ee9ce2a02031dbcef3176174a76
tree5c83cb20af15ed396ada928f50d231e1471b3b30
parent893b8523f1e00a965d91fef0358dfc96af865bac
[CodeGenObjC] Emit [[X alloc] init] as objc_alloc_init(X) when available

This provides a code size win on the caller side, since the init
message send is done in the runtime function.

rdar://44987038

Differential revision: https://reviews.llvm.org/D57936

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354056 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/ObjCRuntime.h
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.h
test/CodeGenObjC/objc-alloc-init.m [new file with mode: 0644]