[LLDBAssert] Use unreachable instead of assert(0)

As per Davide's suggestion offline.

llvm-svn: 365250
This commit is contained in:
Jonas Devlieghere 2019-07-05 21:54:20 +00:00
parent 096600a4b0
commit abd1561f15

View File

@ -21,8 +21,8 @@ void lldb_private::lldb_assert(bool expression, const char *expr_text,
if (LLVM_LIKELY(expression)) if (LLVM_LIKELY(expression))
return; return;
// In a Debug configuration lldb_assert() behaves like assert(). // In a Debug configuration lldb_assert() behaves like assert(0).
assert(false && "lldb_assert failed"); llvm_unreachable("lldb_assert failed");
// In a Release configuration it will print a warning and encourage the user // In a Release configuration it will print a warning and encourage the user
// to file a bug report, similar to LLVMs crash handler, and then return // to file a bug report, similar to LLVMs crash handler, and then return