Skip to content

[5.9] [Macros] Mangle attached macros for accessors #65565

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented May 2, 2023

  • Explanation: 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.
  • Scope: Narrow; affects code using macros on accessors.
  • Risk: Low, no effect in code that doesn't use macros.
  • Reviewed by: @jckarter
  • Issue: rdar://108766291
  • Original pull request: [Macros] Mangle attached macros for accessors #65559

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 DougGregor requested a review from a team as a code owner May 2, 2023 01:26
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 79e8972 into swiftlang:release/5.9 May 2, 2023
@DougGregor DougGregor deleted the macro-attached-to-accessors-mangle-5.9 branch May 2, 2023 15:49
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants