rjmccall added a comment. The correct fix is to honor isInit by folding the logic for EmitScalarInit into this function. That should allow you to eliminate EmitScalarInit completely, although it would be fine to leave it as just a call to EmitStoreThroughLValue. I did a quick audit of all the calls to EmitStoreThroughLValue that might pass isInit=true, and it does look like none of them are relying on the current behavior for ARC ownership; the most suspicious are the calls from EmitObjCCollectionLiteral, but the l-value there is non lifetime-qualified, so it's fine.
https://reviews.llvm.org/D25547 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits