After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
[oota-llvm.git] / lib / Support / ErrorHandling.cpp
index 2a5d906c87893200e4d5920caad990b1ce001285..be0b3803f152e7630967b58a531a22b88eb92581 100644 (file)
@@ -44,7 +44,13 @@ void llvm_report_error(const std::string &reason) {
   exit(1);
 }
 
-void llvm_unreachable(void) {
+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();
 }
 }