aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commite392e6236dc1794e9b97805a36447c8d407209db (patch)
tree88431c319e9b761f4d20f507c6c3cda8106d9772 /llvm/lib/Support/ErrorHandling.cpp
parentbf5998edfba636d37b380c3c58049192b450154f (diff)
downloadllvm-e392e6236dc1794e9b97805a36447c8d407209db.zip
llvm-e392e6236dc1794e9b97805a36447c8d407209db.tar.gz
llvm-e392e6236dc1794e9b97805a36447c8d407209db.tar.bz2
Add a comment explaining why llvm_unreachable_internal doesn't call
the ErrorHandler callback. llvm-svn: 79541
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r--llvm/lib/Support/ErrorHandling.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
index 3467fe7..dff4f03 100644
--- a/llvm/lib/Support/ErrorHandling.cpp
+++ b/llvm/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";