-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Annotate runtime calls with willreturn
attribute
#40089
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
IRGen: Annotate runtime calls with willreturn
attribute
#40089
Conversation
@swift-ci Please test |
Build failed |
fbe7fd7
to
a7c3f14
Compare
@swift-ci Please test |
Some of these (e.g. |
If you go by the letter than we would not be allowed to mark such a function as Because I will go and update the file to fix any confusion. LLVM was assuming every function is |
a7c3f14
to
a049f1b
Compare
Now without allocation functions and objc apis that I wasnt sure about whether they could fatalError (or similar). |
@swift-ci Please test |
There are some more that can allocate (mostly things that use caches, which might insert new entries and allocate memory for them) or otherwise fatal error:
|
`willreturn` This function attribute indicates that a call of this function will either exhibit undefined behavior or comes back and continues execution at a point in the existing call stack that includes the current invocation. Annotated functions may still raise an exception, i.a., `nounwind` is not implied. If an invocation of an annotated function does not return control back to a point in the call stack, the behavior is undefined. I conservatively did not assume that the deinit is willreturn therefore release like operations are not marked `willreturn`. rdar://73574236
a049f1b
to
2e4a869
Compare
@swift-ci Please test |
willreturn
This function attribute indicates that a call of this function will
either exhibit undefined behavior or comes back and continues execution
at a point in the existing call stack that includes the current
invocation. Annotated functions may still raise an exception, i.a.,
nounwind
is not implied. If an invocation of an annotated function doesnot return control back to a point in the call stack, the behavior is
undefined.
I conservatively did not assume that the deinit is willreturn therefore
release like operations are not marked
willreturn
.rdar://73574236