HomePhabricator

lldb_assert: abort when assertions are enabled.

Authored by JDevlieghere on Jul 5 2019, 2:22 PM.

Description

lldb_assert: abort when assertions are enabled.

We had a long discussion in D59911 about lldb_assert and what it means.
The result was the assert manifesto on lldb.llvm.org.

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.

However, currently lldb_assert doesn't behave they way it's being
described there: it doesn't abort in a debug/assert build. This patch
fixes that by adding a call to assert() in lldb_assert().

Differential revision: https://reviews.llvm.org/D64267#1571962

llvm-svn: 365246

Details

Committed
JDevlieghereJul 5 2019, 2:22 PM
Differential Revision
D64267: lldb_assert: abort when assertions are enabled.
Parents
rG5e9610a3f509: AMDGPU: Fix assert in clang test
Branches
Unknown
Tags
Unknown