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
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-