mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75631 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user