From c39a6b16eb1905f75ad492b05919c75c4d79d2dc Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 20 Aug 2009 17:15:19 +0000 Subject: [PATCH] Add a comment explaining why llvm_unreachable_internal doesn't call the ErrorHandler callback. llvm-svn: 79541 --- lib/Support/ErrorHandling.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp index 3467fe702b6..dff4f030fef 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";