summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2020-12-07 13:16:55 -0800
committerAndres Freund <andres@anarazel.de>2020-12-08 16:55:20 -0800
commitdf99ddc70b971a991c5111a33f2f08bd7945d5c2 (patch)
treea217066cdd0309b8fb29c3eb5f46973547f8e71c /src/include
parent62ee70331336161cb44733b6c3e0811696d962aa (diff)
downloadpostgresql-df99ddc70b971a991c5111a33f2f08bd7945d5c2.tar.gz
jit: Reference function pointer types via llvmjit_types.c.
It is error prone (see 5da871bfa1b) and verbose to manually create function types. Add a helper that can reference a function pointer type via llvmjit_types.c and and convert existing instances of manual creation. Author: Andres Freund <andres@anarazel.de> Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20201207212142.wz5tnbk2jsaqzogb@alap3.anarazel.de
Diffstat (limited to 'src/include')
-rw-r--r--src/include/jit/llvmjit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/jit/llvmjit.h b/src/include/jit/llvmjit.h
index 325409acd5..1c89075eaf 100644
--- a/src/include/jit/llvmjit.h
+++ b/src/include/jit/llvmjit.h
@@ -92,6 +92,8 @@ extern LLVMModuleRef llvm_mutable_module(LLVMJitContext *context);
extern char *llvm_expand_funcname(LLVMJitContext *context, const char *basename);
extern void *llvm_get_function(LLVMJitContext *context, const char *funcname);
extern void llvm_split_symbol_name(const char *name, char **modname, char **funcname);
+extern LLVMTypeRef llvm_pg_var_type(const char *varname);
+extern LLVMTypeRef llvm_pg_var_func_type(const char *varname);
extern LLVMValueRef llvm_pg_func(LLVMModuleRef mod, const char *funcname);
extern void llvm_copy_attributes(LLVMValueRef from, LLVMValueRef to);
extern LLVMValueRef llvm_function_reference(LLVMJitContext *context,