Add a comment explaining why llvm_unreachable_internal doesn't call
authorDan Gohman <gohman@apple.com>
Thu, 20 Aug 2009 17:15:19 +0000 (17:15 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 20 Aug 2009 17:15:19 +0000 (17:15 +0000)
the ErrorHandler callback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79541 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/ErrorHandling.cpp

index 3467fe702b60259dfe21db348c10adf529259843..dff4f030fefe2bc6bd75d8f6e3c960fcbbf95006 100644 (file)
@@ -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";