Skip to content

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

Merged
merged 4 commits into from
Mar 27, 2018

Conversation

slavapestov
Copy link
Contributor

No description provided.

@slavapestov
Copy link
Contributor Author

@swift-ci Please test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fdc0ac6daa37baed02b2f22204a5b641fde5e39d

@slavapestov slavapestov changed the title experiment IRGen: Actually make use of private linkage Mar 24, 2018
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fdc0ac6daa37baed02b2f22204a5b641fde5e39d

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov slavapestov requested a review from rjmccall March 24, 2018 10:27
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 4d7fed1c6eb4bf26aa3ad1990228bb46ef0ea97a

Copy link
Contributor

@aschwaighofer aschwaighofer left a 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.

@slavapestov
Copy link
Contributor Author

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.

Copy link
Contributor

@rjmccall rjmccall left a 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.

/// 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,
Copy link
Contributor

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.

@jrose-apple
Copy link
Contributor

I'm not quite sure what past me was thinking. LLVM internal should be fine; it's LLVM private that would be a problem. Maybe I got mixed up. Anyway, if the tests are passing then go ahead.

@gottesmm
Copy link
Contributor

@slavapestov nice!

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 6a993dd into swiftlang:master Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants