blob: 97c176f02b624d7711c69404061aa2cd74b08a18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/********************* */
/*! \file debug.h
** \verbatim
** Original author: Morgan Deters
** Major contributors: none
** Minor contributors (to current version): none
** This file is part of the CVC4 project.
** Copyright (c) 2009-2013 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
** \brief Debugging things.
**
** Debugging things.
**
** These are low-level assertions! Generally you should use
** CVC4::Assert() instead (they throw an exception!). See
** util/Assert.h.
**/
#include "cvc4_private.h"
#ifndef __CVC4__DEBUG_H
#define __CVC4__DEBUG_H
#include <cassert>
#ifdef CVC4_ASSERTIONS
// the __builtin_expect() helps us if assert is built-in or a macro
# define cvc4assert(x) assert(__builtin_expect( ( x ), true ))
#else
// TODO: use a compiler annotation when assertions are off ?
// (to improve optimization)
# define cvc4assert(x) /*__builtin_expect( ( x ), true )*/
#endif /* CVC4_ASSERTIONS */
#endif /* __CVC4__DEBUG_H */
|