aboutsummaryrefslogtreecommitdiff
path: root/src/include/jit/llvmjit.h
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-03-21 19:44:17 -0700
committerAndres Freund <andres@anarazel.de>2018-03-21 19:44:17 -0700
commit31bc604e0b74805ff9e84a2d549ca82be665d0a6 (patch)
treec8edf14d2fd77cc00df16672a00e219ea8981a41 /src/include/jit/llvmjit.h
parent432bb9e04da4d4a1799b1fe7c723b975cb070c43 (diff)
downloadpostgresql-31bc604e0b74805ff9e84a2d549ca82be665d0a6.tar.gz
postgresql-31bc604e0b74805ff9e84a2d549ca82be665d0a6.zip
Add file containing extensions of the LLVM C API.
Author: Andres Freund Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
Diffstat (limited to 'src/include/jit/llvmjit.h')
-rw-r--r--src/include/jit/llvmjit.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/jit/llvmjit.h b/src/include/jit/llvmjit.h
index 187ebe2c2a0..63b2fdfe591 100644
--- a/src/include/jit/llvmjit.h
+++ b/src/include/jit/llvmjit.h
@@ -44,6 +44,23 @@ extern void llvm_assert_in_fatal_section(void);
extern LLVMJitContext *llvm_create_context(int jitFlags);
+
+/*
+ ****************************************************************************
+ * Extensions / Backward compatibility section of the LLVM C API
+ * Error handling related functions.
+ ****************************************************************************
+ */
+#if defined(HAVE_DECL_LLVMGETHOSTCPUNAME) && !HAVE_DECL_LLVMGETHOSTCPUNAME
+/** Get the host CPU as a string. The result needs to be disposed with
+ LLVMDisposeMessage. */
+extern char *LLVMGetHostCPUName(void);
+#endif
+
+/** Get the host CPU features as a string. The result needs to be disposed
+ with LLVMDisposeMessage. */
+extern char *LLVMGetHostCPUFeatures(void);
+
#ifdef __cplusplus
} /* extern "C" */
#endif