blob: 3ee9b7803b709b28c5cedc7846085a7d1e8fe5b1 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// Test that we can set a custom verbose termination function.
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
// We flag uses of the verbose termination function in older dylibs at compile-time to avoid runtime
// failures when back-deploying.
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
#include <cstdlib>
void std::__libcpp_verbose_abort(char const*, ...) {
std::exit(EXIT_SUCCESS);
}
int main(int, char**) {
_LIBCPP_ASSERT(false, "message");
return EXIT_FAILURE;
}