Skip to content

[lldb] Define lldbassert based on NDEBUG instead of LLDB_CONFIGURATIO… #6987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

JDevlieghere
Copy link

…N_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

(cherry picked from commit 10a5076)

…N_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

(cherry picked from commit 10a5076)
@JDevlieghere
Copy link
Author

@swift-ci please test

@JDevlieghere JDevlieghere merged commit 2ca279e into swift/release/5.9 Jun 15, 2023
@JDevlieghere JDevlieghere deleted the 🍒/5.9/10a50762caa6 branch June 15, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant