[NFC][Py Reformat] Added more commits to .git-blame-ignore-revs
[llvm-project.git] / libc / src / assert / assert.h
blobc1f325d8593bce6514bc9444a997e2147f9b1a81
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 //===----------------------------------------------------------------------===//
9 #include "src/assert/__assert_fail.h"
11 // There is no header guard here since assert is intended to be capable of being
12 // included multiple times with NDEBUG defined differently, causing different
13 // behavior.
15 #undef assert
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__, \
23 __PRETTY_FUNCTION__))
24 #endif