-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Cleanup uses of SWIFT_RUNTIME_EXPORT in implementation files #7127
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
@swift-ci please smoke test |
@hughbe, can you separate the @swiftix, can you comment on |
@hughbe You should definitely not remove As for the distinction between |
Is that |
@gparker42 Are you taking about |
Is this distinction used anywhere today? If there is not then we should not attempt to do it, because it is unthinkable that it will actually be correct. If we need to separately annotate declaration and definition in the future then we can re-add them later. |
@gparker42 Well, in ideal world, the single point of truth should be the But coming back to |
Thanks @swiftix
The reason I removed these That said, I've reverted the removal of
Okay. I'll submit a PR in the future either removing the |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
@swift-ci please smoke test |
I don't remember for sure why I duplicated the annotations. IIRC, there was an issue with clang that in a situation where a declaration and definition of the same function would use different calling conventions clang would not always pick the right one. I'd suggest that you simply try out what happens if you remove any calling convention specifiers from the definitions. Temporarily define the calling convention to map to a non-standard calling convention, e.g. preserve_most. Check if the generated assembly stores/restores the registers according to the specified calling convention. Or you could try to produce the LLVM IR and see if the functions in question have a proper calling convention attribute. If we see that the calling convention is properly used, then we can safely remove the calling conventions specifiers from the definitions. Does it sound like a plan? |
@swift-ci please smoke test OS X |
SWIFT_CC(swift)
annotations.See discussion in #7103 and #6820
I have some questions about the
SWIFT_CC
macro:SWIFT_CC(DefaultCC)
in the header, andSWIFT_CC(DefaultCC_Impl)
in the implementation? What does this achieve? Can we clean them up?