This revision was automatically updated to reflect the committed changes.
Closed by commit rC354056: [CodeGenObjC] Emit [[X alloc] init] as
objc_alloc_init(X) when available (authored by epilk, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57936?vs=186784&id=186894#toc
Rep
rjmccall accepted this revision.
rjmccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/CodeGen/CGObjC.cpp:475-483
case ObjCMessageExpr::Class: {
ReceiverType = E->getClassReceiver();
const ObjCObjectType *ObjTy = Recei
erik.pilkington marked 2 inline comments as done.
erik.pilkington added inline comments.
Comment at: clang/lib/CodeGen/CGObjC.cpp:459
+ llvm::Value *Receiver =
+ CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface());
+ return CGF.EmitObjCAllocInit(Receiver, CGF.Con
erik.pilkington updated this revision to Diff 186784.
erik.pilkington marked an inline comment as done.
erik.pilkington added a comment.
Address review comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57936/new/
https://reviews.llvm.org/D57936
Files:
clang/include/clang/Basic/
gparker42 added inline comments.
Comment at: clang/lib/CodeGen/CGObjC.cpp:459
+ llvm::Value *Receiver =
+ CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface());
+ return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType()));
gparker42 wr
gparker42 added inline comments.
Comment at: clang/lib/CodeGen/CGObjC.cpp:459
+ llvm::Value *Receiver =
+ CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface());
+ return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType()));
rjmccall wro
rjmccall added inline comments.
Comment at: clang/lib/CodeGen/CGObjC.cpp:459
+ llvm::Value *Receiver =
+ CGF.CGM.getObjCRuntime().GetClass(CGF, ObjTy->getInterface());
+ return CGF.EmitObjCAllocInit(Receiver, CGF.ConvertType(OME->getType()));
You might nee
erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, pete, ahatanak.
Herald added subscribers: dexonsmith, jkorous.
Herald added a project: clang.
This provides a code size win on the caller side, since the `init` message send
is done in the runtime function.
rdar://