mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
[libc++] Don't manually override NDEBUG in the dylib build
LIBCXX_ENABLE_ASSERTIONS does not have any relationship to the `assert` macro -- it only controls assertions that are internal to the library. Playing around with `NDEBUG` only muddies the picture further than it already is. Also, remove a failing assertion in the benchmarks. That assertion had never been exercised because we defined `NDEBUG` manually, and it was failing since we introduced the ability to generate a benchmark vector with the Quicksort adversary ordering (which is obviously not sorted). This was split off of https://llvm.org/D121123. Differential Revision: https://reviews.llvm.org/D121244
This commit is contained in:
parent
7c385c4b2f
commit
0f622bd281
@ -675,8 +675,6 @@ if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_ENABLE_SHARED)
|
||||
endif()
|
||||
|
||||
# Assertion flags =============================================================
|
||||
define_if(LIBCXX_ENABLE_ASSERTIONS -UNDEBUG)
|
||||
define_if_not(LIBCXX_ENABLE_ASSERTIONS -DNDEBUG)
|
||||
define_if(LIBCXX_ENABLE_ASSERTIONS -D_LIBCPP_DEBUG=0)
|
||||
define_if(LIBCXX_DEBUG_BUILD -D_DEBUG)
|
||||
if (LIBCXX_ENABLE_ASSERTIONS AND NOT LIBCXX_DEBUG_BUILD)
|
||||
|
@ -151,7 +151,6 @@ void fillValues(std::vector<std::string>& V, size_t N, Order O) {
|
||||
|
||||
template <class T>
|
||||
void sortValues(T& V, Order O) {
|
||||
assert(std::is_sorted(V.begin(), V.end()));
|
||||
switch (O) {
|
||||
case Order::Random: {
|
||||
std::random_device R;
|
||||
|
Loading…
x
Reference in New Issue
Block a user