-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Cleanup uses of SWIFT_RT_ENTRY_VISBILITY #7103
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
@hughbe How you decide when you can remove those SWIFT_RT_ENTRY_VISBILITY specifiers? |
Sorry, I was about to fill in some info. Basically, in #6820 there was a discussion with @gparker42 Summary is, I identified all cases where
|
@swift-ci please smoke test |
@hughbe I'm not 100% about this. It was me who added those SWIFT_RT_ENTRY_VISBILITY when I was working on the new calling convention for the Swift runtime functions. The idea of using a macro was useful, because it allows you to easily flip the visibility of a function based on the configuration in Config.h. If you remove these specifiers now, how one can easily change the visibility of symbols without touching a lot of places in the source code? |
Also, quick Q for @gparker42 or anyone else with the knowledge Functions defined in are declared E.g. Definition: https://github.com/apple/swift/blob/adc54c8a4d13fbebfeb68244bac401ef2528d6d0/include/swift/Runtime/RuntimeFunctions.def#L1003 What should we do in these cases? |
The whole point is that this reduces the number of places we actually need to change the visibility of symbols. Basically, the issue right now is that we define a method as This is unnecessary and we don't need to duplicate the visbiility in the cpp file as well as the .h file |
Oh, I missed the point that the symbols have the same specifier in the header. Sorry. No objections then. |
Messed up on OSX (objc specific method) |
@swift-ci please smoke test |
@gparker42 @swiftix good to merge? |
@hugbe LGTM |
And clang-format the effected method signatures - previously there was
extern "C"
, so signatures flow differently