1 //===-- Internal header for assert ------------------------------*- C++ -*-===//
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 "src/assert/__assert_fail.h"
10 
11 // There is no header guard here since assert is intended to be able to be
12 // able to be included multiple times with NDEBUG defined differently, causing
13 // different behavior.
14 
15 #undef assert
16 
17 #ifdef NDEBUG
18 #define assert(e) (void)0
19 #else
20 #define assert(e)                                                              \
21   ((e) ? (void)0 :                                                             \
22     __llvm_libc::__assert_fail(#e, __FILE__, __LINE__, __PRETTY_FUNCTION__))
23 #endif
24