This assert is only checked in Debug builds but ignored in all other builds. This replaces this code with lldbassert
which should print a warning to the user in release builds and actually asserts in debug builds.
I don't recall the details.
Soft assertions. LLDB provides lldb_assert() as a soft alternative to cover the middle ground of situations that indicate a recoverable bug in LLDB. In a Debug configuration lldb_assert() behaves like assert(). In a Release configuration it will print a warning and encourage the user to file a bug report, similar to LLVM’s crash handler, and then return execution. Use these sparingly and only if error handling is not otherwise feasible. Specifically, new code should not be using lldb_assert() and existing uses should be replaced by other means of error handling.
This is a recoverable bug, in my books.
According to the comment there is at least one valid reason for this code path to trigger. An lldb_assert will encourage users to file bugs and I think we have enough real issues that we can do without the additional noise.
Let's summarize this.
- In the old and the new version, the program is aborted with an assert() if the configuration is LLDB_CONFIGURATION_DEBUG.
- In the old version, nothing happens, when the configuration is non-Debug.
- In the new version, the assert in non-Debug configurations will be turned into a warning and *print a warning and encourage the user to file a bug report* (@JDevlieghere that is the noise you're referring to, right?)