aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit_error.cpp
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-01-25 15:23:04 +1300
committerThomas Munro <tmunro@postgresql.org>2024-01-25 15:42:34 +1300
commit820b5af73dcc6a5d0db6a98a62a6b859e5d107b6 (patch)
treecc46c2147142da3b000398e001ea2315ff3e298e /src/backend/jit/llvm/llvmjit_error.cpp
parent729439607ad210dbb446e31754e8627d7e3f7dda (diff)
downloadpostgresql-820b5af73dcc6a5d0db6a98a62a6b859e5d107b6.tar.gz
postgresql-820b5af73dcc6a5d0db6a98a62a6b859e5d107b6.zip
jit: Require at least LLVM 10.
Remove support for older LLVM versions. The default on common software distributions will be at least LLVM 10 when PostgreSQL 17 ships. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CA%2BhUKGLhNs5geZaVNj2EJ79Dx9W8fyWUU3HxcpZy55sMGcY%3DiA%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_error.cpp')
-rw-r--r--src/backend/jit/llvm/llvmjit_error.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/backend/jit/llvm/llvmjit_error.cpp b/src/backend/jit/llvm/llvmjit_error.cpp
index 69a23f6eff9..ebe2f1baa10 100644
--- a/src/backend/jit/llvm/llvmjit_error.cpp
+++ b/src/backend/jit/llvm/llvmjit_error.cpp
@@ -29,12 +29,10 @@ static int fatal_new_handler_depth = 0;
static std::new_handler old_new_handler = NULL;
static void fatal_system_new_handler(void);
-#if LLVM_VERSION_MAJOR > 4
static void fatal_llvm_new_handler(void *user_data, const char *reason, bool gen_crash_diag);
#if LLVM_VERSION_MAJOR < 14
static void fatal_llvm_new_handler(void *user_data, const std::string& reason, bool gen_crash_diag);
#endif
-#endif
static void fatal_llvm_error_handler(void *user_data, const char *reason, bool gen_crash_diag);
#if LLVM_VERSION_MAJOR < 14
static void fatal_llvm_error_handler(void *user_data, const std::string& reason, bool gen_crash_diag);
@@ -65,9 +63,7 @@ llvm_enter_fatal_on_oom(void)
if (fatal_new_handler_depth == 0)
{
old_new_handler = std::set_new_handler(fatal_system_new_handler);
-#if LLVM_VERSION_MAJOR > 4
llvm::install_bad_alloc_error_handler(fatal_llvm_new_handler);
-#endif
llvm::install_fatal_error_handler(fatal_llvm_error_handler);
}
fatal_new_handler_depth++;
@@ -83,9 +79,7 @@ llvm_leave_fatal_on_oom(void)
if (fatal_new_handler_depth == 0)
{
std::set_new_handler(old_new_handler);
-#if LLVM_VERSION_MAJOR > 4
llvm::remove_bad_alloc_error_handler();
-#endif
llvm::remove_fatal_error_handler();
}
}
@@ -110,9 +104,7 @@ llvm_reset_after_error(void)
if (fatal_new_handler_depth != 0)
{
std::set_new_handler(old_new_handler);
-#if LLVM_VERSION_MAJOR > 4
llvm::remove_bad_alloc_error_handler();
-#endif
llvm::remove_fatal_error_handler();
}
fatal_new_handler_depth = 0;
@@ -133,7 +125,6 @@ fatal_system_new_handler(void)
errdetail("while in LLVM")));
}
-#if LLVM_VERSION_MAJOR > 4
static void
fatal_llvm_new_handler(void *user_data,
const char *reason,
@@ -153,7 +144,6 @@ fatal_llvm_new_handler(void *user_data,
fatal_llvm_new_handler(user_data, reason.c_str(), gen_crash_diag);
}
#endif
-#endif
static void
fatal_llvm_error_handler(void *user_data,