Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / src / assert / assert.h
blob0318a934acca490af0cbe67c21e0c25bfd6c6c1b
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 : LIBC_NAMESPACE::__assert_fail(#e, __FILE__, __LINE__, \
23 __PRETTY_FUNCTION__))
24 #endif