Skip to content

[interop][SwiftToCxx] Annotate emitted declarations with Clang's external_source_symbol attribute #63002

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 3 commits into from
Jan 18, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Jan 12, 2023

Each emitted declaration is annotated with the external_source_symbol with its own USR, to allow Clang's indexer to recognize this declaration as a Swift declaration with a specific USR

hyp added 2 commits January 11, 2023 11:47
…rnal_source_symbol attribute

Each emitted declaration is annotated with the external_source_symbol with its own USR, to allow Clang's indexer to recognize this declaration as a Swift declaration with a specific USR
@hyp hyp added the c++ interop Feature: Interoperability with C++ label Jan 12, 2023
@hyp
Copy link
Contributor Author

hyp commented Jan 12, 2023

@swift-ci please smoke test

@hyp
Copy link
Contributor Author

hyp commented Jan 12, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Jan 13, 2023

@swift-ci please test source compatibility

2 similar comments
@hyp
Copy link
Contributor Author

hyp commented Jan 17, 2023

@swift-ci please test source compatibility

@hyp
Copy link
Contributor Author

hyp commented Jan 17, 2023

@swift-ci please test source compatibility

@hyp hyp merged commit 294a91f into swiftlang:main Jan 18, 2023
hyp added a commit to llvm/llvm-project that referenced this pull request Feb 23, 2023
Allow the user to specify a concrete USR in the external_source_symbol attribute.
That will let Clang's indexer to use Swift USRs for Swift declarations that are
represented with C++ declarations.

This new clause is used by Swift when generating a C++ header representation
of a Swift module:
swiftlang/swift#63002

Differential Revision: https://reviews.llvm.org/D141324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant