Skip to content

cleanup LangOptions #28457

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
Dec 3, 2019
Merged

cleanup LangOptions #28457

merged 4 commits into from
Dec 3, 2019

Conversation

compnerd
Copy link
Member

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

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9e4634c3fe7abaaa1c435adb075419dc889038f4

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9e4634c3fe7abaaa1c435adb075419dc889038f4

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 9e4634c3fe7abaaa1c435adb075419dc889038f4

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 9e4634c3fe7abaaa1c435adb075419dc889038f4

Switch over `Triple::getOS` instead of a series of cascading `if`s.
This simplifies the handling of adding new entries.  It also makes the
precedence ordering more explicit.
Collapse the cases into a single set rather than adding a case for each
entry.  This is easier to read/follow.  NFC.
Rather than an if repeating the condition, simplify using a ternary for
the value.  NFC.
The platform versions are really only used on Darwin platforms.
Simplify the path by defaulting to `0.0.0` on all platforms, and
handling the version number on supported platforms.
@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 1808f5be29c12107bdeb697b3ab08e9c0380c2fd

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1808f5be29c12107bdeb697b3ab08e9c0380c2fd

@gottesmm
Copy link
Contributor

@dgregor what do you think?

@compnerd
Copy link
Member Author

compnerd commented Dec 2, 2019

I have a building backlog of patches. I'd like to get this merged so I can start flushing them.

@compnerd compnerd merged commit 98dcc5e into swiftlang:master Dec 3, 2019
@compnerd compnerd deleted the basic-cleanup branch December 3, 2019 16:27
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.

3 participants