-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[ProgrammersManual] Update report_fatal_error docs #138502
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
Update docs for llvm#138251. Mention reportFatalInternalError and reportFatalUsageError in the respective sections of the documentation.
LG, thanks. |
if (VerifyFooAnalysis && !Foo.verify()) { | ||
reportFatalInternalError("Analysis 'foo' not preserved"); | ||
} | ||
|
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.
I think it would be helpful to additionally say "This will produce a crash trace and will ask users to report an LLVM bug." as you do in the doc comment in the header. But this is a non-blocking suggestion.
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.
This is in a section about assertions, if you want to include this I don't think it should single out this API but be explicit around line 419.
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.
Ack, good point about the surrounding context. I think more detail on exactly what reportFatalInternalError
does would be helpful, but I agree the section in general could be made more explicit. Probably makes more sense as a separate PR then.
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.
I think this section in general needs some more information on what these APIs do under different build options. E.g. for llvm_unreachable() we have three different behaviors based on the value of LLVM_ENABLE_ASSERTIONS and LLVM_UNREACHABLE_OPTIMIZE. It will either abort with a crash trace, aggressively optimize away the unreachable path or produce a trap. (Which means that llvm_unreachable can be both weaker and stronger than plain assert...)
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/11307 Here is the relevant piece of the build log for the reference
|
Update docs for llvm#138251. Mention reportFatalInternalError and reportFatalUsageError in the respective sections of the documentation.
Update docs for #138251. Mention reportFatalInternalError and reportFatalUsageError in the respective sections of the documentation.