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