Have lldb_assert accept bool expressions

Summary:
This changes lldb_assert to accept bool expressions as the parameter, this is because some
objects (such as std::shared_ptr) are convertible to bool, but are not convertible to int, which
leads to surprising errors.

Reviewers: granata.enrico, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D9565

llvm-svn: 236819
This commit is contained in:
Pavel Labath 2015-05-08 09:53:31 +00:00
parent 85fadd9fe8
commit 014d32b3bb
2 changed files with 2 additions and 2 deletions
lldb
include/lldb/Utility
source/Utility

View File

@ -20,7 +20,7 @@
namespace lldb_private {
void
lldb_assert (int expression,
lldb_assert (bool expression,
const char* expr_text,
const char* func,
const char* file,

View File

@ -17,7 +17,7 @@ using namespace llvm;
using namespace lldb_private;
void
lldb_private::lldb_assert (int expression,
lldb_private::lldb_assert (bool expression,
const char* expr_text,
const char* func,
const char* file,