[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 13 11:43:37 PDT 2016
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
More information about the cfe-commits
mailing list