1//===----------------- LLDBAssert.h ------------------------------*- 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#ifndef LLDB_UTILITY_LLDBASSERT_H
10#define LLDB_UTILITY_LLDBASSERT_H
11
12#ifdef LLDB_CONFIGURATION_DEBUG
13#define lldbassert(x) assert(x)
14#else
15#define lldbassert(x) \
16 lldb_private::lldb_assert(static_cast<bool>(x), #x, __FUNCTION__, __FILE__, \
17 __LINE__)
18#endif
19
20namespace lldb_private {
21void lldb_assert(bool expression, const char *expr_text, const char *func,
22 const char *file, unsigned int line);
23} // namespace lldb_private
24
25#endif // LLDB_UTILITY_LLDBASSERT_H
26