-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Actually make use of private linkage #15476
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 test Linux |
Build failed |
fdc0ac6
to
4d7fed1
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
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.
Nice cleanup.
The HiddenNonUnique change should be NFC since we never actually assign that linkage.
The internal linkage change LGTM assuming the debugger does not need access to private symbols (I don't know the history there). @jrose-apple added this code in 2015.
Yeah, the lldb tests passed so I’m assuming that hack is no longer necessary. But I’ll wait for @rjmccall or @jrose-apple to take a look before merging. I also noticed we emit value witnesses as linkonce_odr for no apparent reason. I don’t think they need to be ODR except for imported types. |
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.
Otherwise the change looks great.
include/swift/SIL/FormalLinkage.h
Outdated
/// This entity is visible in only a single Swift module but does not | ||
/// have a unique file that is known to define it. | ||
HiddenNonUnique, | ||
Hidden, |
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.
Removing HiddenNonUnique makes sense to me if we never use it currently. Renaming HiddenUnique seems like it doesn't actually win us anything, and it just creates pain if we ever need to reintroduce HiddenNonUnique.
I'm not quite sure what past me was thinking. LLVM |
@slavapestov nice! |
4d7fed1
to
98d74bd
Compare
@swift-ci Please smoke test |
No description provided.