/*------------------------------------------------------------------------- * * 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 /* Avoid macro clash with LLVM's C++ headers */ #undef Min #include #include "jit/llvmjit.h" /* * C-API extensions. */ LLVMTypeRef LLVMGetFunctionReturnType(LLVMValueRef r) { return llvm::wrap(llvm::unwrap(r)->getReturnType()); } LLVMTypeRef LLVMGetFunctionType(LLVMValueRef r) { return llvm::wrap(llvm::unwrap(r)->getFunctionType()); }