summaryrefslogtreecommitdiff
path: root/lib/Support/ErrorHandling.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-20 17:15:19 +0000
committerDan Gohman <gohman@apple.com>2009-08-20 17:15:19 +0000
commit073f5b669d3f2ea60981d0c044bd43099e7a3dd1 (patch)
tree2d2d3cac34c4454b288d16a85eadc01e6e3518f4 /lib/Support/ErrorHandling.cpp
parentcdd93d8c35e1e983fd3a37f3de2ebc154731f20d (diff)
downloadllvm-073f5b669d3f2ea60981d0c044bd43099e7a3dd1.tar.gz
llvm-073f5b669d3f2ea60981d0c044bd43099e7a3dd1.tar.bz2
llvm-073f5b669d3f2ea60981d0c044bd43099e7a3dd1.tar.xz
Add a comment explaining why llvm_unreachable_internal doesn't call
the ErrorHandler callback. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ErrorHandling.cpp')
-rw-r--r--lib/Support/ErrorHandling.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp
index 3467fe702b..dff4f030fe 100644
--- a/lib/Support/ErrorHandling.cpp
+++ b/lib/Support/ErrorHandling.cpp
@@ -58,6 +58,9 @@ void llvm_report_error(const Twine &reason) {
void llvm_unreachable_internal(const char *msg, const char *file,
unsigned line) {
+ // This code intentionally doesn't call the ErrorHandler callback, because
+ // llvm_unreachable is intended to be used to indicate "impossible"
+ // situations, and not legitimate runtime errors.
if (msg)
errs() << msg << "\n";
errs() << "UNREACHABLE executed";