[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 14 01:24:19 PST 2017
ahatanak created this revision.
ahatanak added reviewers: rjmccall, doug.gregor, rsmith.
Herald added a subscriber: mgorny.
ObjectiveC ARC in C mode currently disallows having __strong and __weak pointers in structs. This patch takes the first step towards lifting that restriction. In order to properly manage the lifetimes of the objects owned by the structs, this patch modifies IRGen to synthesize special functions for structs with __strong pointers and call them when those structs have to be initialized, copied, and destructed similarly to what C++ special member functions of non-trivial classes do.
I plan to send a patch that allows __weak pointers in structs after this patch is committed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 75095 bytes
Desc: not available
More information about the cfe-commits