Introduce lldbassert(x)
authorEnrico Granata <egranata@apple.com>
Wed, 4 Mar 2015 22:59:20 +0000 (22:59 +0000)
committerEnrico Granata <egranata@apple.com>
Wed, 4 Mar 2015 22:59:20 +0000 (22:59 +0000)
commit53ed89c6da24c2fa45bea84ddc9742f9bea0db14
tree963b52523303b581367af9e9f1573b3d76c38960
parentdc8f979b412792a1da9842d6d003a1ec4fea86f0
Introduce lldbassert(x)

We would like it if LLDB never crashed, especially if we never caused LLDB to crash
On the other hand, having assertions can sometimes be useful

lldbassert(x) is the best of both worlds:
- in debug builds, it turns into a regular assert, which is fine because we don't mind debug LLDB to crash on development machines
- in non-debug builds, it emits a message formatted just like assert(x) would, but then instead of crashing, it dumps a backtrace, suggests filing a bug, and keeps running

llvm-svn: 231310
lldb/include/lldb/Utility/LLDBAssert.h [new file with mode: 0644]
lldb/lldb.xcodeproj/project.pbxproj
lldb/source/Utility/LLDBAssert.cpp [new file with mode: 0644]