Skip to content

Conversation

zoecarver
Copy link

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: swiftlang/swift#32291

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

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: swiftlang/swift#32291

Differential Revision: https://reviews.llvm.org/D82392
@zoecarver
Copy link
Author

@swift-ci please test.

@zoecarver zoecarver changed the title [CodeGen] Add public function to get the implicit C++ destructor argument (if existent). Cherry-pick from upstream: [CodeGen] Add public function to get the implicit C++ destructor argument (if existent). Jul 2, 2020
@zoecarver
Copy link
Author

@martinboehme @gribozavr @rjmccall could one of you review and commit this change for me?

@rjmccall rjmccall merged commit 8c7c96c into swiftlang:apple/stable/20200108 Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants