-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Rename pointer bounds #78210
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
Rename pointer bounds #78210
Conversation
@swift-ci please smoke test |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@swift-ci please smoke test |
I took the liberty of not adding |
76bb962
to
fa5fbfa
Compare
@swift-ci please smoke test |
Availability is needed on every declaration that might be linked by a separate executable (so that the compiler can generate correct linkage relative to the deployment target of the executable for the symbols). Even if the only separate executables that reference it are macro plugins, I think it may still be appropriate to have accurate availability. |
How does this work for the stdlib? If I simply try adding |
@swift-ci please test linux |
Could this test failure actually be related to my changes?
It doesn't seem like something that should be affected, but maybe I'm missing something. It seems like other PRs are passing fine. |
I remember seeing this on other PRs. I think you should just rerun the tests, hopefully should be fixed by now. |
|
Edit: d'oh, found it as soon as I posted my reply: I forgot to mark the macro definition with |
These declarations are weird, because they are used in the arguments to the new macro but aren't part of the expansion and shouldn't ever be used outside of those macro arguments. We'd like them not to have availability at all, because the macros themselves should be usable on early deployment targets (some of the things they expand to might require newer deployment targets, but that's fine). |
Doesn't the macro plugin itself need to link the symbols associated with |
The macro plugin is going to need to have its own version of any of these types, so that it itself is not deployment-target-gated. |
Ok, if |
This raises the question: do we want macro expansions with |
@swift-ci please smoke test |
6e71801
to
86f9b8e
Compare
@swift-ci please smoke test |
Yes, the functions we generate that use Span will have to have appropriate availability. (That can, of course, but a follow-up) |
Renames the
@PointerBounds
macro to@_SwiftifyImport
and makes it generally available in the standard library. The API is expected to change drastically without accompanying release notes or backwards compatibility, as the macro is intended to be applied by ClangImporter only, which will be updated in tandem with the macro.