[lldb] Define lldbassert based on NDEBUG instead of LLDB_CONFIGURATION_DEBUG
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 16 May 2023 05:47:12 +0000 (22:47 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 16 May 2023 16:27:09 +0000 (09:27 -0700)
commit10a50762caa6ac17dd063b28863a2ec60576c6f7
tree83099cec25705788995dc9974fc8c2fcad22044e
parent9e37a7bd1f38fed4e00704d561b3897fe8915c4c
[lldb] Define lldbassert based on NDEBUG instead of LLDB_CONFIGURATION_DEBUG

Whether assertions are enabled or not is orthogonal to the build type
which could lead to surprising behavior for lldbassert. Previously, when
doing a debug build with assertions disabled, lldbassert would become a
NOOP, rather than printing an error like it does in a release build. By
definining lldbassert in terms of NDEBUG, it behaves like a regular
assert when assertions are enabled, and like a soft assert.

Differential revision: https://reviews.llvm.org/D150639
lldb/docs/resources/contributing.rst
lldb/include/lldb/Utility/LLDBAssert.h
lldb/source/Utility/LLDBAssert.cpp