Skip to content

[Macros] Mangle attached macros for accessors #65559

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

Attached macro mangles for accessors were using a fallback case that
triggers an assertion in +Asserts builds, and conflicting manglings is
non-Asserts builds. Provide a custom mangling for these cases that's
embedded in the identifier.

This is a narrow hack to eliminate an assertion. We are considering a
different approach for the long term that uses entity manglings with a
placeholder type, which will be more flexible long-term.

Attached macro mangles for accessors were using a fallback case that
triggers an assertion in +Asserts builds, and conflicting manglings is
non-Asserts builds. Provide a custom mangling for these cases that's
embedded in the identifier.

This is a narrow hack to eliminate an assertion. We are considering a
different approach for the long term that uses entity manglings with a
placeholder type, which will be more flexible long-term.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test macOS

@DougGregor
Copy link
Member Author

swiftlang/swift-driver#1348

@swift-ci please smoke test macOS

@DougGregor DougGregor merged commit db81593 into swiftlang:main May 2, 2023
@DougGregor DougGregor deleted the macro-attached-to-accessors-mangle branch May 2, 2023 20:34
@kastiglione
Copy link
Contributor

Breadcrumbs, see followup: #70435.

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