Re: pgsql: jit: Support opaque pointers in LLVM 16.
От | Alvaro Herrera |
---|---|
Тема | Re: pgsql: jit: Support opaque pointers in LLVM 16. |
Дата | |
Msg-id | 202311061811.m5heranea4gj@alvherre.pgsql обсуждение исходный текст |
Список | pgsql-hackers |
On 2023-Oct-18, Thomas Munro wrote: > jit: Support opaque pointers in LLVM 16. > > Remove use of LLVMGetElementType() and provide the type of all pointers > to LLVMBuildXXX() functions when emitting IR, as required by modern LLVM > versions[1]. > > * For LLVM <= 14, we'll still use the old LLVMBuildXXX() functions. I have LLVM 14 (whatever Debian ships[*]), and running headerscheck results in a bunch of warnings from this: In file included from /tmp/headerscheck.s89Gdv/test.c:2: /pgsql/source/master/src/include/jit/llvmjit_emit.h: In function ‘l_call’: /pgsql/source/master/src/include/jit/llvmjit_emit.h:141:9: warning: ‘LLVMBuildCall’ is deprecated [-Wdeprecated-declarations] 141 | return LLVMBuildCall(b, fn, args, nargs, name); | ^~~~~~ In file included from /usr/include/llvm-c/Core.h:18, from /pgsql/source/master/src/include/jit/llvmjit_emit.h:18: /usr/include/llvm-c/Core.h:3991:1: note: declared here 3991 | LLVM_ATTRIBUTE_C_DEPRECATED( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ These warnings go away if I change the conditional from LLVM_VERSION_MAJOR < 16 to 14. Let's ... do that? As in the attached patch. In 13, there's a comment about it being deprecated, but no macro to make the compiler whine: https://github.com/hdoc/llvm-project/blob/release/13.x/llvm/include/llvm-c/Core.h#L3953 This changed in 14: https://github.com/hdoc/llvm-project/blob/release/14.x/llvm/include/llvm-c/Core.h#L3898 [*] apt policy llvm: llvm: Installed: 1:14.0-55.7~deb12u1 Candidate: 1:14.0-55.7~deb12u1 Version table: *** 1:14.0-55.7~deb12u1 500 500 http://ftp.de.debian.org/debian bookworm/main amd64 Packages 100 /var/lib/dpkg/status -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Вложения
В списке pgsql-hackers по дате отправления: