mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-06 12:20:15 +01:00
Remove support for older LLVM versions. The default on common software distributions will be at least LLVM 10 when PostgreSQL 17 ships. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CA%2BhUKGLhNs5geZaVNj2EJ79Dx9W8fyWUU3HxcpZy55sMGcY%3DiA%40mail.gmail.com
44 lines
835 B
C++
44 lines
835 B
C++
/*-------------------------------------------------------------------------
|
|
*
|
|
* 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>
|
|
|
|
/* Avoid macro clash with LLVM's C++ headers */
|
|
#undef Min
|
|
|
|
#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());
|
|
}
|