summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/ErrorHandling.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-14 12:49:22 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-14 12:49:22 +0000
commit1ab40bef8dfe416cc82455eea39d01d496752d90 (patch)
treeb708ed14a1705fee61a29d1853f2d0ec51530399 /llvm/lib/Support/ErrorHandling.cpp
parent6cdb897258ffc6dc4a8f45128741647d1d278848 (diff)
downloadbcm5719-llvm-1ab40bef8dfe416cc82455eea39d01d496752d90.tar.gz
bcm5719-llvm-1ab40bef8dfe416cc82455eea39d01d496752d90.zip
After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
Fix by making the LLVM_UNREACHABLE pass __FILE__ and __LINE__ to llvm_unreachable. llvm-svn: 75631
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r--llvm/lib/Support/ErrorHandling.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
index f2e247c5274..be0b3803f15 100644
--- a/llvm/lib/Support/ErrorHandling.cpp
+++ b/llvm/lib/Support/ErrorHandling.cpp
@@ -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();
}
}
OpenPOWER on IntegriCloud