Skip to content

Demangle inverse requirements when building AST types #72336

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

Conversation

DougGregor
Copy link
Member

Extend TypeDecoder with support for inverse requirements, passing them
along to the type builder. Then implement support for inverse
requirements within the AST demangler, which addresses the round-trip
demangling failures we've been seeing.

The runtime and remote inspection facilities still need metadata to
deal with inverse requirements.

Fixes rdar://124564447.

For entities that must be part of the primary definition of a type,
mangle without inverses on the generic parameters of the enclosing
type. This ensures that we can adopt noncopyable on the generic
parameters without breaking the mangling of the fundamental entities
that describe the layout of the type.

Do this for enum elements first, so we don't break the mangling of
`Optional`. There will be other cases to consider as well.
Extend TypeDecoder with support for inverse requirements, passing them
along to the type builder. Then implement support for inverse
requirements within the AST demangler, which addresses the round-trip
demangling failures we've been seeing.

The runtime and remote inspection facilities still need metadata to
deal with inverse requirements.

Fixes rdar://124564447.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit 735e28b into swiftlang:main Mar 15, 2024
@DougGregor DougGregor deleted the demangle-inverse-requirements-to-ast branch March 15, 2024 00:30
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.

1 participant