Skip to content

[5.9] Make sure we visit auxiliary declarations for symbol visitation. #64944

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

  • Explanation: Ensure that we visit top-level auxiliary declarations as part of SIL symbol visitation, which fixes TBD generation (e.g., <symbol> is in generated IR file, but not in TBD file errors) that occur when using top-level freestanding or peer macros that introduce new public declarations.
  • Scope: Affects code using peer or freestanding macro expansions at the top level.
  • Risk: Low; only affects macro expansions at the top level.
  • Issue: rdar://107426276
  • Testing: Additional tests added.
  • Original pull request: Make sure we visit auxiliary declarations for symbol visitation. #64942

SIL symbol visitation wasn't visiting top-level auxiliary declarations, which meant that it skipped peer and freestanding macros at module scope. This would manifest in errors of the form

<symbol> is in the generated IR file, but not in TBD file

Fixes rdar://107426276.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

SIL symbol visitation wasn't visiting top-level auxiliary declarations,
which meant that it skipped peer and freestanding macros at module
scope. This would manifest in errors of the form

    <symbol> is in the generated IR file, but not in TBD file

Fixes rdar://107426276.
@DougGregor DougGregor requested a review from a team as a code owner April 5, 2023 18:58
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit 44be113 into swiftlang:release/5.9 Apr 6, 2023
@DougGregor DougGregor deleted the sil-symbol-visitor-aux-decls-5.9 branch April 6, 2023 03:52
@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