blob: 54459800728b120929b1c7dd180bd16c6073f707 [file] [log] [blame]
Louis Dionne9bdbeb32022-02-14 13:41:09 -05001//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include <__assert>
10#include <__config>
11#include <cstdio>
12#include <cstdlib>
Louis Dionne9bdbeb32022-02-14 13:41:09 -050013
14_LIBCPP_BEGIN_NAMESPACE_STD
15
Louis Dionne6e8eb552022-03-03 17:37:03 -050016_LIBCPP_WEAK
17void __libcpp_assertion_handler(char const* __file, int __line, char const* __expression, char const* __message) {
18 std::fprintf(stderr, "%s:%d: libc++ assertion '%s' failed. %s\n", __file, __line, __expression, __message);
19 std::abort();
Louis Dionne9bdbeb32022-02-14 13:41:09 -050020}
21
22_LIBCPP_END_NAMESPACE_STD