Skip to content

ApplyIRLinkage cleanups #21639

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 6 commits into from
Jan 4, 2019
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jan 4, 2019

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Use the `IRLInkage::InternalLinkOnceODR` linkage rather than computing
that in a couple of sites.  This gives us semantic meaning to the
linkage being applied.  NFC.
Create a new named IRLinkage type: `InternalWeakODR`.  This just gives
the IRLinkage a semantic name rather than the computed value.  NFC.
Sinking this logic into the IRLinkage application means that we can
clean up the various sites that are handling the IRLinkage and/or
DLLStorage to apply IRLinkage semantically, making the code easier to
understand as well as avoiding the proliferation of the `useDLLStorage`
checks.
Now that DLLStorage is only applied when needed, always pass the correct
DLLStorage.  The IRLinkage applicator will determine if the DLLStorage
should be applied or not.
Create two new semantic names: `ExternalImport` and `ExternalExport`.
These are for symbols which are either imported from an external module
or exported for consumption by external modules.
Use `ApplyIRLinkage` rather than manually applying the DLLStorage.  This
makes it much more apparent as to the desired semantic linkage desired.
@compnerd
Copy link
Member Author

compnerd commented Jan 4, 2019

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Jan 4, 2019

@rjmccall - I believe that this was the type of cleanup that you were alluding to. I finally got around to actually doing some amount of it

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.

Looks like an improvement. I've totally forgotten the conversation, though. :)

@compnerd compnerd merged commit 7f00541 into swiftlang:master Jan 4, 2019
@compnerd compnerd deleted the tinkering-linkering branch January 4, 2019 23:26
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.

2 participants