Skip to content

[cxx-interop] ensure destructors referenced only by the exception cle… #74722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jun 26, 2024

…anup landing pad in the constructor's initializer are picked up to be candidates for potential emission into one LLVM IR module

A C++ record destructor that is called implicitly in the landing pad cleanup code of a constructor after a field is initialized might only be referenced there, so the Clang decl finder should pick it up when scanning the AST for interesting Decls that might have to be emitted into one LLVM IR module.

@hyp hyp added the c++ interop Feature: Interoperability with C++ label Jun 26, 2024
@hyp hyp requested a review from egorzhdan as a code owner June 26, 2024 05:04
@hyp
Copy link
Contributor Author

hyp commented Jun 26, 2024

@swift-ci please test

…anup landing pad in the constructor's initializer are picked up to be candidates for potential emission into one LLVM IR module

A C++ record destructor that is called implicitly in the landing pad cleanup code of a constructor after a field is initialized might only be referenced there, so the Clang decl finder should pick it up when scanning the AST for interesting Decls that might have to be emitted into one LLVM IR module.
@hyp hyp force-pushed the eng/destructor-cxx-interop-exc-cleanup branch from c9c48f9 to 781a9fc Compare June 26, 2024 05:13
@hyp
Copy link
Contributor Author

hyp commented Jun 26, 2024

@swift-ci please test

@egorzhdan egorzhdan requested a review from Xazax-hun June 26, 2024 12:27
Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hyp hyp requested review from compnerd and hjyamauchi June 26, 2024 15:14
@hyp hyp merged commit 9c4232c into swiftlang:main Jun 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants