[PATCH] D64464: [CodeGen] Emit destructor calls for non-trivial C structs

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 18:40:35 PDT 2019


ahatanak created this revision.
ahatanak added a reviewer: rjmccall.
ahatanak added a project: clang.
Herald added subscribers: dexonsmith, jkorous.

This patch fixes a bug in IRGen where it wasn't calling the destructors for non-trivial C structs in the following cases:

- member access of structs that are returned from a function.
- compound literal.
- load from volatile types.

rdar://problem/51867864


Repository:
  rC Clang

https://reviews.llvm.org/D64464

Files:
  lib/CodeGen/CGExpr.cpp
  lib/CodeGen/CGExprAgg.cpp
  test/CodeGenObjC/strong-in-c-struct.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64464.208863.patch
Type: text/x-patch
Size: 4805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190710/ae1414b8/attachment.bin>


More information about the cfe-commits mailing list