blob: 3c7a2d45d4f01d13508078d04ed4ba694c0db1a6 [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 at link-time.
// We flag uses of the verbose termination function in older dylibs at compile-time to avoid runtime
// failures when back-deploying.
// XFAIL: availability-verbose_abort-missing
#include <__cxx03/__verbose_abort>
#include <cstdlib>
void std::__libcpp_verbose_abort(char const*, ...) _NOEXCEPT { std::exit(EXIT_SUCCESS); }
int main(int, char**) {
std::__libcpp_verbose_abort("%s", "message");
return EXIT_FAILURE;
}