[PATCH] D62643: [CodeGen][ObjC] Convert '[self alloc]' in a class method to 'objc_alloc(self)'
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 29 21:39:20 PDT 2019
ahatanak created this revision.
ahatanak added reviewers: rjmccall, pete, erik.pilkington.
ahatanak added a project: clang.
Herald added subscribers: dexonsmith, jkorous.
In a class method, 'self' points to the class object, so it should be safe to pass it to `objc_alloc`. Also, convert '[[self alloc] init]' in a class method to 'objc_alloc_init(self)'.
rdar://problem/50855121
Repository:
rC Clang
https://reviews.llvm.org/D62643
Files:
lib/CodeGen/CGObjC.cpp
test/CodeGenObjC/convert-messages-to-runtime-calls.m
test/CodeGenObjC/objc-alloc-init.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62643.202113.patch
Type: text/x-patch
Size: 6880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190530/ae790d3e/attachment-0001.bin>
More information about the cfe-commits
mailing list