summaryrefslogtreecommitdiff
path: root/src/include/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/debug.h')
-rw-r--r--src/include/debug.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/include/debug.h b/src/include/debug.h
new file mode 100644
index 000000000..95e705bcb
--- /dev/null
+++ b/src/include/debug.h
@@ -0,0 +1,24 @@
+/********************* -*- C++ -*- */
+/** debug.h
+ ** This file is part of the CVC4 prototype.
+ **
+ ** The Analysis of Computer Systems Group (ACSys)
+ ** Courant Institute of Mathematical Sciences
+ ** New York University
+ **/
+
+#ifndef __CVC4_DEBUG_H
+#define __CVC4_DEBUG_H
+
+#include <cassert>
+
+#ifdef DEBUG
+// the __builtin_expect() helps us if assert is built-in or a macro
+# define cvc4assert(x) assert(__builtin_expect((x), 1))
+#else
+// TODO: use a compiler annotation when assertions are off ?
+// (to improve optimization)
+# define cvc4assert(x)
+#endif /* DEBUG */
+
+#endif /* __CVC4_DEBUG_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback