PostgreSQL Source Code  git master
llvmjit_wrap.cpp
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * llvmjit_wrap.cpp
4  * Parts of the LLVM interface not (yet) exposed to C.
5  *
6  * Copyright (c) 2016-2024, PostgreSQL Global Development Group
7  *
8  * IDENTIFICATION
9  * src/backend/lib/llvm/llvmjit_wrap.cpp
10  *
11  *-------------------------------------------------------------------------
12  */
13 
14 extern "C"
15 {
16 #include "postgres.h"
17 }
18 
19 #include <llvm-c/Core.h>
20 #include <llvm/IR/Function.h>
21 
22 #include "jit/llvmjit.h"
23 
24 
25 /*
26  * C-API extensions.
27  */
28 
29 LLVMTypeRef
31 {
32  return llvm::wrap(llvm::unwrap<llvm::Function>(r)->getReturnType());
33 }
34 
35 LLVMTypeRef
36 LLVMGetFunctionType(LLVMValueRef r)
37 {
38  return llvm::wrap(llvm::unwrap<llvm::Function>(r)->getFunctionType());
39 }
LLVMTypeRef LLVMGetFunctionReturnType(LLVMValueRef r)
LLVMTypeRef LLVMGetFunctionType(LLVMValueRef r)