Skip to content

[sil-combine] When simplifying convert functions, base whether or not… #22887

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

gottesmm
Copy link
Contributor

… an apply has nothrow on the actual function_ref.

Previously, we based it off of whether or not the original apply had a nothrow
bit. This is incorrect in the case where we added an error result to a function
without an error result. In such a case, we need to /not/ put on the nothrow
bit. This commit generalizes this idea slightly by assuming that if we are asked
to perform this transformation we should just match what the underlying
function_ref (i.e. setting nothrow if the underlying function type has an error
result and not setting nothrow if the underlying function type does not have an
error result).

rdar://47828439
(cherry picked from commit 4d90cdd)

… an apply has nothrow on the actual function_ref.

Previously, we based it off of whether or not the original apply had a nothrow
bit. This is incorrect in the case where we added an error result to a function
without an error result. In such a case, we need to /not/ put on the nothrow
bit. This commit generalizes this idea slightly by assuming that if we are asked
to perform this transformation we should just match what the underlying
function_ref (i.e. setting nothrow if the underlying function type has an error
result and not setting nothrow if the underlying function type does not have an
error result).

rdar://47828439
(cherry picked from commit 4d90cdd)
@gottesmm gottesmm requested a review from eeckstein February 25, 2019 19:25
@gottesmm
Copy link
Contributor Author

@swit-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 52f0956

@slavapestov
Copy link
Contributor

I'm cherry-picking this into #22819 and fixing the existentials_objc failure there.

@gottesmm
Copy link
Contributor Author

I think Slava is going to include this patch in his changes. I'll keep this open until he finishes.

@gottesmm
Copy link
Contributor Author

Slava merged in #22819... closing!

@gottesmm gottesmm closed this Feb 26, 2019
@gottesmm gottesmm deleted the swift-5.1-branch-48368204 branch February 26, 2019 21:47
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