summaryrefslogtreecommitdiff
path: root/src/util/debug.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2009-12-17 21:05:15 +0000
committerMorgan Deters <mdeters@gmail.com>2009-12-17 21:05:15 +0000
commitdfcf7dba0b2d8ad6eb9d8540e92804e70205b8fb (patch)
tree6cc700c94a4a72e5f4b758803b079dfed059e054 /src/util/debug.h
parentfdc93191d331c6bd4a2934eb5cbeb18d78cb078d (diff)
update-copyright.pl now retrieves and incorporates author information from repository history; re-ran update-copyright.pl; cleaned up some things with make
Diffstat (limited to 'src/util/debug.h')
-rw-r--r--src/util/debug.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/util/debug.h b/src/util/debug.h
index 14dc0fbd1..800106764 100644
--- a/src/util/debug.h
+++ b/src/util/debug.h
@@ -1,5 +1,8 @@
/********************* -*- C++ -*- */
/** debug.h
+ ** Original author: mdeters
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
** This file is part of the CVC4 prototype.
** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
@@ -7,20 +10,27 @@
** See the file COPYING in the top-level source directory for licensing
** information.
**
+ ** Debugging things.
+ **
+ ** These are low-level assertions! Generally you should use
+ ** CVC4::Assert() instead (they throw an exception!). See
+ ** util/Assert.h.
**/
#ifndef __CVC4__DEBUG_H
#define __CVC4__DEBUG_H
+#include "cvc4_config.h"
+
#include <cassert>
-#ifdef DEBUG
+#ifdef CVC4_ASSERTIONS
// the __builtin_expect() helps us if assert is built-in or a macro
-# define cvc4assert(x) assert(__builtin_expect((x), 1))
+# define cvc4assert(x) assert(EXPECT_TRUE( x ))
#else
// TODO: use a compiler annotation when assertions are off ?
// (to improve optimization)
-# define cvc4assert(x)
-#endif /* DEBUG */
+# 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