After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
[oota-llvm.git] / lib / Support / ErrorHandling.cpp
index f2e247c5274779868efd673b974b8c86c5514572..be0b3803f152e7630967b58a531a22b88eb92581 100644 (file)
@@ -44,9 +44,13 @@ void llvm_report_error(const std::string &reason) {
   exit(1);
 }
 
-void llvm_unreachable(const char *msg) {
+void llvm_unreachable(const char *msg, const char *file, unsigned line) {
   if (msg)
     errs() << msg << "\n";
+  errs() << "UNREACHABLE executed";
+  if (file)
+    errs() << " at " << file << ":" << line;
+  errs() << "!\n";
   abort();
 }
 }