[PATCH] D39562: [CodeGen][ObjC] Fix an assertion failure caused by copy elision

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 12:41:59 PST 2017


rjmccall added a comment.

Hmm.  The OVE-ing of the RHS of a property assignment is just there to make the original source structure clearer.  Maybe the right solution here is to set a flag in the OVE that says that it's a unique semantic reference to its source expression, and then change IRGen to just recurse through OVEs with that flag set (and not pre-bind it).

You should make sure that we don't get this assertion with mandatory copy-elision and ?:, which does actually use its LHS multiple times semantically (and which cannot safely perform mandatory copy-elision on it).


https://reviews.llvm.org/D39562





More information about the cfe-commits mailing list