-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New compiler directive to replace _compiler_version #15977
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
40a3317
to
8079cbf
Compare
The implementation also needs to cover this case that came up during the review evolution thread. |
8079cbf
to
6e51997
Compare
@tkremenek Isn't that already the case in |
@tkremenek Any news? |
@swift-ci test |
@hartbit you're absolutely right. Sorry for the delay in responding. @jrose-apple can you give this review with another pair of eyes? Looks fairly straightforward. |
Build failed |
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.
It looks good to me, with one potential cleanup comment.
lib/Parse/ParseIfConfig.cpp
Outdated
auto Val = version::Version::parseVersionString( | ||
Str, SourceLoc(), nullptr).getValue(); | ||
auto thisVersion = version::Version::getCurrentLanguageVersion(); | ||
return thisVersion >= Val; |
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.
It would be nice to share code with the "swift"
case above!
6e51997
to
2abb931
Compare
@swift-ci test |
Build failed |
@jrose-apple I addressed your cleanup comment. Thanks for the review! |
Build failed |
@swift-ci smoke test |
@hartbit can you prepare another pull request against |
This is implementation for the
Compiler Version Directive
proposal: swiftlang/swift-evolution#833