Skip to content

fix order of export annotation relative to extern and other annotations #56

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 1 commit into from
Jun 27, 2025

Conversation

andrurogerz
Copy link
Collaborator

Overview

Change the insert position of export macro relative to other annotations and the extern keyword. Specifically, if a symbol has any other annotations or is extern, we position the export macro immediately before the symbol's type location. This ensures the export annotation is inserted after extern and any existing attributes.

Validation

  • Updated existing unit tests.
  • Added new test cases.
  • Ran tests on Linux & Windows

@andrurogerz
Copy link
Collaborator Author

Now that this LLVM PR is merged, it is safe to insert the export macro after the extern keyword. This assumes the export macro will always resume to an __attribute__-style visibility attribute on non-Windows targets rather than a C++ style attribute, which must appear before the extern keyword.

@compnerd compnerd merged commit 7d09df7 into compnerd:main Jun 27, 2025
2 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.

2 participants