-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SIL: remove the private_external SILLinkage #39632
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
SIL: remove the private_external SILLinkage #39632
Conversation
@swift-ci test |
@swift-ci benchmark |
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.
I love these cleanups!
Build failed |
Performance (x86_64): -O
Code size: -OPerformance (x86_64): -OsizeCode size: -OsizePerformance (x86_64): -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Build failed |
c6b608b
to
8e0fad2
Compare
@swift-ci test |
Build failed |
Build failed |
8e0fad2
to
e526abc
Compare
@swift-ci test |
Build failed |
Build failed |
e526abc
to
70e96d4
Compare
@swift-ci test |
Build failed |
…ey don't have a valid linkage for "fragile ref". E.g. a serialized witness table must not reference a private function. Just like a serialized function must not reference a private function.
This was a relict from the -sil-serialize-all days. This linkage doesn't make any sense because a private function cannot be referenced from another module (or file, in case of non-wmo compilation).
70e96d4
to
30a74f6
Compare
@swift-ci test |
The
private_external
linkage was a relict from the sil-serialize-all days. This linkage doesn't make any sense because a private function cannot be referenced from another module (or file, in case of non-wmo compilation).This PR also contains another change: diagnose body-less private functions with an _silgen_name attribute
Functions with an
@_silgen_name
attribute can be declared without a body - for referencing externally defined C functions. But this does not make sense for private functions.So far, this error was not diagnosed - and it didn't cause any problem, because such functions were generated with a
private_external
linkage.With removing the linkage, it does not work anymore and would result in SILVerifier errors.