[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 1 17:56:12 PDT 2019
ahatanak updated this revision to Diff 212942.
ahatanak marked 2 inline comments as done.
ahatanak added a comment.
Herald added a reviewer: martong.
Herald added a reviewer: shafik.
- Emit member access, compound literal, and call expressions as subexpressions of `ExprWithCleanups` if the expressions are of C struct types that require non-trivial destruction. This fixes the bug in IRGen where it was destructing the function return at the end of the enclosing scope rather than at the end of the full expression (see the changes made in test/CodeGenObjC/arc.m).
- Add compound literal expressions with automatic storage duration to the list of cleanup objects of `ExprWithCleanups` if the expressions have C struct types requiring non-trivial destruction. This enables IRGen to destruct the compound literals at the end of their enclosing scopes.
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 34510 bytes
Desc: not available
More information about the cfe-commits