summaryrefslogtreecommitdiff
path: root/src/util/debug.h
blob: 81ce491b7bf931d0a62fed5cb1df0e340b12e784 (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: mdeters
 ** Major contributors: none
 ** Minor contributors (to current version): none
 ** This file is part of the CVC4 prototype.
 ** Copyright (c) 2009-2012  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(EXPECT_TRUE( x ))
#else
// TODO: use a compiler annotation when assertions are off ?
// (to improve optimization)
#  define cvc4assert(x) /*EXPECT_TRUE( x )*/
#endif /* CVC4_ASSERTIONS */

#endif /* __CVC4__DEBUG_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback