-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Minor fixes to borrow accessors #86023
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
We don't have support for borrowing switch on Copyable types. It is supported for ~Copyable types, but the return expression emission for borrow accessors is not yet implemented. Diagnose instead of crashing the compiler.
|
@swift-ci test |
| return %2 | ||
| } | ||
|
|
||
| sil [ossa] @call_mutate_accessor : $@convention(thin) (@inout Wrapper, @owned Klass) -> () { |
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.
The CHECK lines are missing here.
(Note that the main test file for EscapeUtils is SILOptimizer/escape_info.sil. But testing the change here is also fine).
10dd321 to
0c5fe56
Compare
|
@swift-ci smoke test |
|
@swift-ci smoke test macOS platform |
|
@swift-ci smoke test windows platform |
|
@swift-ci test windows platform |
This change fixes crashes in SILGenCleanup and EscapeUtils for borrow accessors.
Also a adds a diagnostic for borrow/mutate accessors in enums.