This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add global assertion handler for debug mode.
AbandonedPublic

Authored by EricWF on Aug 25 2015, 10:07 PM.

Details

Reviewers
mclow.lists
Summary

This patch adds a global assertion handler that is called when _LIBCPP_ASSERT fails. This allows us to test debug mode features without _LIBCPP_ASSERT always calling abort().

This patch also fixes PR17147 and uses the new assertion handlers in the tests. (see https://llvm.org/bugs/show_bug.cgi?id=17147)

Diff Detail

Event Timeline

EricWF updated this revision to Diff 33178.Aug 25 2015, 10:07 PM
EricWF retitled this revision from to [libcxx] Add global assertion handler for debug mode..
EricWF updated this object.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.
EricWF updated this revision to Diff 33179.Aug 25 2015, 10:19 PM

Remove all functions in the dylib and make them inline.

EricWF updated this revision to Diff 33180.Aug 25 2015, 10:22 PM

Cleanup the diff and remove extra changes.

This patch looks correct to me. Is there any reason it wasn't committed?

This patch looks correct to me. Is there any reason it wasn't committed?

I was concerned about using a function-local static in the library headers, I don't think libc++ does that anywhere else and I wanted to make sure it was safe to do.

EricWF abandoned this revision.Jul 19 2016, 5:22 PM