diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Utility/LLDBAssert.cpp | |
parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) |
Notes
Diffstat (limited to 'source/Utility/LLDBAssert.cpp')
-rw-r--r-- | source/Utility/LLDBAssert.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/Utility/LLDBAssert.cpp b/source/Utility/LLDBAssert.cpp index 48c1b69e8947..3902c89b2c83 100644 --- a/source/Utility/LLDBAssert.cpp +++ b/source/Utility/LLDBAssert.cpp @@ -19,14 +19,14 @@ using namespace lldb_private; void lldb_private::lldb_assert(bool expression, const char *expr_text, const char *func, const char *file, unsigned int line) { - if (expression) - ; - else { - errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n", - expr_text, func, file, line); - errs() << "backtrace leading to the failure:\n"; - llvm::sys::PrintStackTrace(errs()); - errs() << "please file a bug report against lldb reporting this failure " - "log, and as many details as possible\n"; - } + if (LLVM_LIKELY(expression)) + return; + + errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n", + expr_text, func, file, line); + errs() << "backtrace leading to the failure:\n"; + llvm::sys::PrintStackTrace(errs()); + errs() << "please file a bug report against lldb reporting this failure " + "log, and as many details as possible\n"; + abort(); } |