[all-commits] [llvm/llvm-project] e7c5da: [CodeGen] Add public function to emit C++ destruct...

Zoe Carver via All-commits all-commits at lists.llvm.org
Wed Jul 1 11:01:47 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e7c5da57a5f3fdb6649ff92cb8ba0ce3c4978668
      https://github.com/llvm/llvm-project/commit/e7c5da57a5f3fdb6649ff92cb8ba0ce3c4978668
  Author: zoecarver <z.zoelec2 at gmail.com>
  Date:   2020-07-01 (Wed, 01 Jul 2020)

  Changed paths:
    M clang/include/clang/CodeGen/CodeGenABITypes.h
    M clang/lib/CodeGen/ABIInfo.h
    M clang/lib/CodeGen/CGCXXABI.h
    M clang/lib/CodeGen/CodeGenABITypes.cpp
    M clang/lib/CodeGen/ItaniumCXXABI.cpp
    M clang/lib/CodeGen/MicrosoftCXXABI.cpp

  Log Message:
  -----------
  [CodeGen] Add public function to emit C++ destructor call.

Adds `CodeGen::getCXXDestructorImplicitParam`, to retrieve a C++ destructor's implicit parameter (after the "this" pointer) based on the ABI in the given CodeGenModule.

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

Differential Revision: https://reviews.llvm.org/D82392




More information about the All-commits mailing list