LCOV - code coverage report
Current view: top level - src/backend/jit/llvm - llvmjit_wrap.cpp (source / functions) Hit Total Coverage
Test: PostgreSQL 17devel Lines: 4 4 100.0 %
Date: 2024-03-28 11:11:48 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      21             : /* Avoid macro clash with LLVM's C++ headers */
      22             : #undef Min
      23             : 
      24             : #include <llvm/IR/Function.h>
      25             : 
      26             : #include "jit/llvmjit.h"
      27             : 
      28             : 
      29             : /*
      30             :  * C-API extensions.
      31             :  */
      32             : 
      33             : LLVMTypeRef
      34         798 : LLVMGetFunctionReturnType(LLVMValueRef r)
      35             : {
      36         798 :     return llvm::wrap(llvm::unwrap<llvm::Function>(r)->getReturnType());
      37             : }
      38             : 
      39             : LLVMTypeRef
      40       56174 : LLVMGetFunctionType(LLVMValueRef r)
      41             : {
      42       56174 :     return llvm::wrap(llvm::unwrap<llvm::Function>(r)->getFunctionType());
      43             : }

Generated by: LCOV version 1.14