[libcxx-commits] [PATCH] D70343: Add a `_LIBCPP_HARDEN` define
Jan Wilken Dörrie via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 12 01:35:00 PDT 2020
jdoerrie accepted this revision.
jdoerrie added a comment.
This revision is now accepted and ready to land.
LGTM, but I would still like to know whether we actually need this in addition to `_LIBCPP_DEBUG=0`. As far as I can tell setting `_LIBCPP_DEBUG` to `0` makes `_LIBCPP_ASSERT(x, m)` be equivalent to `((x) ? (void)0 : abort_fun(x, m))`, where `abort_fun` is effectively the following:
void abort_fun(condition, message) {
std::fprintf(stderr, "__FILE__: __LINE__: _LIBCPP_ASSERT ${condition} failed. ${message}\n");
std::abort();
}
Maybe that is good enough for our purposes?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70343/new/
https://reviews.llvm.org/D70343
More information about the libcxx-commits
mailing list