summaryrefslogtreecommitdiffstats
path: root/llvm/docs/ProgrammersManual.rst
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2017-08-18 06:45:34 +0000
committerAlex Bradbury <asb@lowrisc.org>2017-08-18 06:45:34 +0000
commitf698a29a513566be1ae7f67be2afd4574999c9c2 (patch)
treea261014fc3593b46069fca096c305c95dfe3f5f5 /llvm/docs/ProgrammersManual.rst
parent7182440fbd11ce1c3602bafd8aaba2da765dc94b (diff)
downloadbcm5719-llvm-f698a29a513566be1ae7f67be2afd4574999c9c2.tar.gz
bcm5719-llvm-f698a29a513566be1ae7f67be2afd4574999c9c2.zip
Refine report_fatal_error guidance after post-commit review
Use text suggested by Justin Bogner in post-commit review of r311146 <http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170814/479898.html>, which makes it clear that report_fatal_error shouldn't be used when there is a practicable alternative. Also make this clearer in CodingStandards. llvm-svn: 311147
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r--llvm/docs/ProgrammersManual.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 6ae72be426c..d1ee80a7b8a 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -443,11 +443,12 @@ recovery.
.. note::
- Ideally, the error handling approach described in this section would be
- used throughout LLVM. However, this is not yet the case. For
- non-programmatic errors where the ``Error`` scheme cannot easily be
- applied, ``report_fatal_error`` should be used to call any installed error
- handler and then terminate the program.
+ While it would be ideal to use this error handling scheme throughout
+ LLVM, there are places where this hasn't been practical to apply. In
+ situations where you absolutely must emit a non-programmatic error and
+ the ``Error`` model isn't workable you can call ``report_fatal_error``,
+ which will call installed error handlers, print a message, and exit the
+ program.
Recoverable errors are modeled using LLVM's ``Error`` scheme. This scheme
represents errors using function return values, similar to classic C integer
OpenPOWER on IntegriCloud