diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Solver/Z3Builder.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Solver/Z3Builder.cpp b/lib/Solver/Z3Builder.cpp index f928c927..ae78c21c 100644 --- a/lib/Solver/Z3Builder.cpp +++ b/lib/Solver/Z3Builder.cpp @@ -27,7 +27,14 @@ llvm::cl::opt<bool> UseConstructHashZ3( } void custom_z3_error_handler(Z3_context ctx, Z3_error_code ec) { - ::Z3_string errorMsg = Z3_get_error_msg(ctx, ec); + ::Z3_string errorMsg = +#ifdef HAVE_Z3_GET_ERROR_MSG_NEEDS_CONTEXT + // Z3 > 4.4.1 + Z3_get_error_msg(ctx, ec); +#else + // Z3 4.4.1 + Z3_get_error_msg(ec); +#endif // FIXME: This is kind of a hack. The value comes from the enum // Z3_CANCELED_MSG but this isn't currently exposed by Z3's C API if (strcmp(errorMsg, "canceled") == 0) { |