ahatanak added inline comments.
Comment at: lib/Sema/SemaPseudoObject.cpp:432
+ if (capturedRHS->getType()->getAsCXXRecordDecl() && capturedRHS->isRValue())
> I think you can unconditionally set this here, actually. You just need to
> teach the other two exhaustive emitters in IRGen (scalar and complex) to look
> through unique OVEs. Plenty of other things in IRGen could benefit from
> being able to peephole through unique OVEs.
> Also, you can set it on the OVE for the base expression if this is a simple
> assignment or load.
All the builders created in checkPseudoObjectRValue and
checkPseudoObjectAssignment (only when the assignment is simple) set the OVE's
IsUnique bit to true.
cfe-commits mailing list