Skip to content

[clang][ExtractAPI] Fix quirks in interaction with submodules (#105868) #9193

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

daniel-grumberg
Copy link

Extension SGFs require the module system to be enabled in order to discover which module defines the extended external type. This patch ensures the following:

  • Associate symbols with their top level module name, and that only top level modules are considered as modules for emitting extension SGFs.
  • Ensure we don't drop macro definitions that came from a submodule. To this end look at all defined macros in PPCalbacks::EndOfMainFile instead of relying on PPCallbacks::MacroDefined being called to detect a macro definition.

rdar://123020565

…05868)

Extension SGFs require the module system to be enabled in order to discover which module defines the extended external type.
This patch ensures the following:
- Associate symbols with their top level module name, and that only top level modules are considered as modules for emitting extension SGFs.
- Ensure we don't drop macro definitions that came from a submodule. To this end look at all defined macros in `PPCalbacks::EndOfMainFile` instead of relying on `PPCallbacks::MacroDefined` being called to detect a macro definition.

rdar://123020565
@daniel-grumberg
Copy link
Author

@swift-ci please test

@daniel-grumberg
Copy link
Author

@swift-ci please test llvm

@daniel-grumberg daniel-grumberg merged commit 3cce7ae into swiftlang:stable/20240723 Aug 30, 2024
2 of 5 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