[PATCH] D44968: [ObjC] Generalize NRVO to cover non-trivial C structs

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is it possible to just do this for all structs? I don't think it hurts anything to do it for structs that are trivial and returned indirectly, and it would certainly be nice to construct C return values in-place even if they're guilty of nothing more than being, y'kno

[PATCH] D44968: [ObjC] Generalize NRVO to cover non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, doug.gregor, rsmith. r326307 and r327870 made changes that allowed using non-trivial C structs with fields qualified with __strong or __weak. This commit generalizes NRVO, which could only be applied to C++ structs, to cover non-