[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 4 17:59:14 PST 2020


ahatanak updated this revision to Diff 248363.
ahatanak marked 2 inline comments as done.
ahatanak removed a project: LLVM.
ahatanak removed a subscriber: llvm-commits.
ahatanak added a comment.
Herald added a subscriber: ributzka.

Address review comments.

- Declare the flags in `ReturnValueSlot` as bitfields.
- Replace flag `RequiresDestruction` with flag `IsExternallyDestructed` and move the `pushDestroy` call to `EmitCall`. I audited all the places where `ReturnValueSlot` is constructed and there were only a few places where `IsExternallyDestructed` had to be set to true.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66094/new/

https://reviews.llvm.org/D66094

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CGCall.h
  clang/lib/CodeGen/CGClass.cpp
  clang/lib/CodeGen/CGExprAgg.cpp
  clang/lib/CodeGen/CGVTables.cpp
  clang/lib/Parse/ParseObjc.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaExprObjC.cpp
  clang/test/CodeGenObjC/arc.m
  clang/test/CodeGenObjC/strong-in-c-struct.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66094.248363.patch
Type: text/x-patch
Size: 14328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200305/0363a730/attachment.bin>


More information about the cfe-commits mailing list