llvmjit: Make llvm_types_module variable static
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 27 Sep 2023 11:02:14 +0000 (13:02 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Wed, 27 Sep 2023 11:02:14 +0000 (13:02 +0200)
Commit b059d2f45685a introduced llvm_types_module and accidentally
exported it. As there is no usecase for accessing this variable
externally, this makes it static.

Author: Andres Freund <andres@anarazel.de>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/20221101055132.pjjsvlkeo4stbjkq@awork3.anarazel.de

src/backend/jit/llvm/llvmjit.c
src/include/jit/llvmjit.h

index fc0ccea329cb8b5dde29c8feb49bee7fb445e05d..caf261a559f8ad05a43d4456a132cb0200822e45 100644 (file)
@@ -77,7 +77,7 @@ LLVMTypeRef StructAggStatePerTransData;
 
 LLVMValueRef AttributeTemplate;
 
-LLVMModuleRef llvm_types_module = NULL;
+static LLVMModuleRef llvm_types_module = NULL;
 
 static bool llvm_session_initialized = false;
 static size_t llvm_generation = 0;
index 551b585464671541e55a690f812d371b4e3c2ca1..17b3b7593ff7681476b65d558740927b755f85b4 100644 (file)
@@ -55,9 +55,6 @@ typedef struct LLVMJitContext
    List       *handles;
 } LLVMJitContext;
 
-/* llvm module containing information about types */
-extern PGDLLIMPORT LLVMModuleRef llvm_types_module;
-
 /* type and struct definitions */
 extern PGDLLIMPORT LLVMTypeRef TypeParamBool;
 extern PGDLLIMPORT LLVMTypeRef TypePGFunction;