Skip to content

[embedded] Don't emit metadata references from C++ interop #78100

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 2 commits into from
Dec 13, 2024

Conversation

kubamracek
Copy link
Contributor

This resolves a compiler crash when using C++ interop in Embedded Swift:

Assertion failed: (LazyTypeMetadata.empty()), function emitLazyDefinitions, file GenDecl.cpp, line 1330.
...
8  swift-frontend           0x000000010093cf60 swift::irgen::IRGenerator::emitLazyDefinitions() + 3212
9  swift-frontend           0x0000000100a580f8 swift::IRGenRequest::evaluate(swift::Evaluator&, swift::IRGenDescriptor) const + 2632
10 swift-frontend           0x0000000100aa64a4 swift::GeneratedModule swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)17>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const + 200

@egorzhdan egorzhdan requested a review from Xazax-hun December 11, 2024 14:03
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!

Copy link
Contributor

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

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

LGTM!

@Xazax-hun
Copy link
Contributor

Is it possible to add a test?

@kubamracek
Copy link
Contributor Author

Added a test that reproduces the compiler crash.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek enabled auto-merge December 12, 2024 23:09
@kubamracek kubamracek force-pushed the embedded-no-metadata-cxx branch from 9b85a0a to 77c6494 Compare December 12, 2024 23:32
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek merged commit 0bbaa35 into swiftlang:main Dec 13, 2024
4 of 5 checks passed
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.

4 participants