[PATCH] D82392: [CodeGen] Add public function to emit C++ destructor call.

Zoe Carver via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 23 10:10:31 PDT 2020


zoecarver created this revision.
zoecarver added reviewers: rjmccall, mboehme.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Adds `CodeGen::emitCXXDestructorCall`, a function that creates a CodeGenFunction using the arguments provided, then invokes CodeGenFunction::EmitCXXDestructorCall.

This will allow other frontends (Swift, for example) to easily emit calls to object destructors with correct ABI semantics and calling convetions.

This is needed for Swift C++ interop. Here's the corresponding Swift change: https://github.com/apple/swift/pull/32291


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82392

Files:
  clang/include/clang/CodeGen/CodeGenABITypes.h
  clang/lib/CodeGen/ABIInfo.h
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenABITypes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82392.272758.patch
Type: text/x-patch
Size: 4520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200623/71f4f91b/attachment-0001.bin>


More information about the cfe-commits mailing list