xref: /openbsd-src/gnu/llvm/libcxx/include/cassert (revision 4bdff4bed0e3d54e55670334c7d0077db4170f86)
146035553Spatrick// -*- C++ -*-
2*4bdff4beSrobert//===----------------------------------------------------------------------===//
346035553Spatrick//
446035553Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
546035553Spatrick// See https://llvm.org/LICENSE.txt for license information.
646035553Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
746035553Spatrick//
846035553Spatrick//===----------------------------------------------------------------------===//
946035553Spatrick
1046035553Spatrick/*
1146035553Spatrick    cassert synopsis
1246035553Spatrick
1346035553SpatrickMacros:
1446035553Spatrick
1546035553Spatrick    assert
1646035553Spatrick
1746035553Spatrick*/
1846035553Spatrick
19*4bdff4beSrobert#include <__assert> // all public C++ headers provide the assertion handler
2046035553Spatrick#include <__config>
21*4bdff4beSrobert
22*4bdff4beSrobert// <assert.h> is not provided by libc++
23*4bdff4beSrobert#if __has_include(<assert.h>)
2446035553Spatrick#  include <assert.h>
25*4bdff4beSrobert#  ifdef _LIBCPP_ASSERT_H
26*4bdff4beSrobert#    error "If libc++ starts defining <assert.h>, the __has_include check should move to libc++'s <assert.h>"
27*4bdff4beSrobert#  endif
28*4bdff4beSrobert#endif
2946035553Spatrick
3046035553Spatrick#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
3146035553Spatrick#  pragma GCC system_header
3246035553Spatrick#endif
33