-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[OSLog][Test] Add test to check constant evaluability of functions in the new OSLog overlay #27228
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
[OSLog][Test] Add test to check constant evaluability of functions in the new OSLog overlay #27228
Conversation
@swift-ci Please test |
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.
Just two tiny nits in diagnostic text.
include/swift/AST/DiagnosticsSIL.def
Outdated
NOTE(constexpr_unknown_function_called_here, none, | ||
NOTE(constexpr_found_callee_with_no_body, none, | ||
"encountered call to '%0' whose body is not available. " | ||
"Imported functions must be marked @inlinable to constant evaluate.", |
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.
Nit: attributes should be surrounded with single quotes. Might be worth adding a fix-it as well.
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.
Thanks @theblixguy
include/swift/AST/DiagnosticsSIL.def
Outdated
ERROR(not_constant_evaluable, none, "not constant evaluable", ()) | ||
ERROR(constexpr_imported_func_not_onone, none, "imported constant evaluable " | ||
"function '%0' must be annotated @_optimize(none)", (StringRef)) |
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.
Same here. Also, “annotated with”
Build failed |
@_semantics("constant_evaluable") annotation to denote constant evaluable functions. Add a test suite that uses the sil-opt pass ConstantEvaluableSubsetChecker.cpp to check the constant evaluability of function in the OSLog overlay.
59020e9
to
61fd4b1
Compare
@swift-ci Please test and merge |
1 similar comment
@swift-ci Please test and merge |
Update the new oslog overlay implementation to use @_semantics("constant_evaluable") annotation to denote constant evaluable functions.
Add a new test that uses the sil-opt pass ConstantEvaluableSubsetChecker.cpp
to check the constant evaluability of functions in the OSLog overlay.