[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak closed this revision. ahatanak added a comment. Fixed in d8136f14f125fb27f2326f397df0964bf62078ca Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70935/new/

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-03 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Yes, that's great, thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70935/new/ https://reviews.llvm.org/D70935

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1054 + "pointer to __strong expected"); + EmitStoreOfScalar(*AI++, LV); +} else rjmccall wrote: > This definitely deserves a comment. > > I don't think the assertion

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 232027. ahatanak marked 2 inline comments as done. ahatanak added a comment. Call `EmitStoreThroughLValue` and `EmitLoadOfLValue` only when the lvalue is a bitfield. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1054 + "pointer to __strong expected"); + EmitStoreOfScalar(*AI++, LV); +} else This definitely deserves a comment. I don't think the assertion is right; the condition

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Note that passing `isInit=true` to `EmitStoreThroughLValue` to make it emit `llvm.objc.retain` would be incorrect since the callee destructs the struct argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70935/new/

[PATCH] D70935: [CodeGen][ObjC] Emit a primitive store to store a __strong field in ExpandTypeFromArgs

2019-12-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a project: clang. Herald added subscribers: ributzka, dexonsmith, jkorous. This fixes a bug in IRGen where a call to `llvm.objc.storeStrong` was being emitted to initialize a __strong field of an uninitialized