};
#define CVC4_API_CHECK(cond) \
- CVC4_PREDICT_FALSE(cond) \
+ CVC4_PREDICT_TRUE(cond) \
? (void)0 : OstreamVoider() & CVC4ApiExceptionStream().ostream()
#define CVC4_API_CHECK_NOT_NULL \
<< "Invalid kind '" << kindToString(kind) << "'";
#define CVC4_API_KIND_CHECK_EXPECTED(cond, kind) \
- CVC4_PREDICT_FALSE(cond) \
+ CVC4_PREDICT_TRUE(cond) \
? (void)0 \
: OstreamVoider() \
& CVC4ApiExceptionStream().ostream() \
<< "Invalid kind '" << kindToString(kind) << "', expected "
#define CVC4_API_ARG_CHECK_EXPECTED(cond, arg) \
- CVC4_PREDICT_FALSE(cond) \
+ CVC4_PREDICT_TRUE(cond) \
? (void)0 \
: OstreamVoider() \
& CVC4ApiExceptionStream().ostream() \
<< "', expected "
#define CVC4_API_ARG_SIZE_CHECK_EXPECTED(cond, arg) \
- CVC4_PREDICT_FALSE(cond) \
+ CVC4_PREDICT_TRUE(cond) \
? (void)0 \
: OstreamVoider() \
& CVC4ApiExceptionStream().ostream() \
<< "Invalid size of argument '" << #arg << "', expected "
#define CVC4_API_ARG_AT_INDEX_CHECK_EXPECTED(cond, what, arg, idx) \
- CVC4_PREDICT_FALSE(cond) \
+ CVC4_PREDICT_TRUE(cond) \
? (void)0 \
: OstreamVoider() \
& CVC4ApiExceptionStream().ostream() \
#ifdef __has_builtin
#if __has_builtin(__builtin_expect)
#define CVC4_PREDICT_FALSE(x) (__builtin_expect(x, false))
+#define CVC4_PREDICT_TRUE(x) (__builtin_expect(x, true))
#else
#define CVC4_PREDICT_FALSE(x) x
+#define CVC4_PREDICT_TRUE(x) x
#endif
#else
#define CVC4_PREDICT_FALSE(x) x
+#define CVC4_PREDICT_TRUE(x) x
#endif
namespace CVC4 {