1533145c4SJoseph Huber //===-- Implementation of __assert_fail -----------------------------------===// 2533145c4SJoseph Huber // 3533145c4SJoseph Huber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4533145c4SJoseph Huber // See https://llvm.org/LICENSE.txt for license information. 5533145c4SJoseph Huber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6533145c4SJoseph Huber // 7533145c4SJoseph Huber //===----------------------------------------------------------------------===// 8533145c4SJoseph Huber 9533145c4SJoseph Huber #include "src/assert/__assert_fail.h" 10533145c4SJoseph Huber #include "src/__support/OSUtil/io.h" 11533145c4SJoseph Huber #include "src/__support/libc_assert.h" 12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 13533145c4SJoseph Huber #include "src/stdlib/abort.h" 14533145c4SJoseph Huber 15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 16533145c4SJoseph Huber 17533145c4SJoseph Huber LLVM_LIBC_FUNCTION(void, __assert_fail, 18533145c4SJoseph Huber (const char *assertion, const char *file, unsigned line, 19533145c4SJoseph Huber const char *function)) { 20b6bc9d72SGuillaume Chatelet LIBC_NAMESPACE::report_assertion_failure(assertion, file, line, function); 21b6bc9d72SGuillaume Chatelet LIBC_NAMESPACE::abort(); 22533145c4SJoseph Huber } 23533145c4SJoseph Huber 24*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 25