llvm_c_ext/include/llvm-c-ext/DIBuilder.h
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 15 Sep 2016 22:14:32 +0100
changeset 79 6d6e5a3ec6b1
parent 54 a288aced3dd1
permissions -rw-r--r--
llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
//===- DIBuilderBindings.h - Bindings for DIBuilder -------------*- C++ -*-===//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
//                     The LLVM Compiler Infrastructure
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
// This file is distributed under the University of Illinois Open Source
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
// License. See LICENSE.TXT for details.
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
//===----------------------------------------------------------------------===//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
// This file defines C bindings for the DIBuilder class.
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
//===----------------------------------------------------------------------===//
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
/*
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
 * Shamelessly based on DIBuilderBindings.h from LLVM's GO bindings. The original
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
 * file could be found at bindings/go/llvm/DIBuilderBindings.h in LLVM source tree.
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
 */
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
#ifndef LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
#define LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
32
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    22
#include <llvm-c/Core.h>
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
#include <llvm-c-ext/CoreExt.h>
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
#ifdef __cplusplus
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
extern "C" {
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
#endif
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
79
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    29
/**
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    30
 * Debug info flags.
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    31
 * 
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    32
 * \see llvm::DINode::DIFlags
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    33
 */
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    34
enum LLVMDIFlag {
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    35
#define HANDLE_DI_FLAG(ID, NAME) DIFlag##NAME = ID,
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    36
#include "llvm/IR/DebugInfoFlags.def"
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    37
    DIFlagAccessibility = DIFlagPrivate | DIFlagProtected | DIFlagPublic
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    38
};
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    39
6d6e5a3ec6b1 llvm_c_ext: Updated to use `llvm::DINode::DIFlags` rather than just `unsigned`. Added new constantpool `LLVMDIFLags`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 54
diff changeset
    40
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
// FIXME: These bindings shouldn't be Go-specific and should eventually move to
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
// a (somewhat) less stable collection of C APIs for use in creating bindings of
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
// LLVM in other languages.
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
void LLVMDIBuilderFinalize(LLVMDIBuilderRef d);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
32
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    52
/**
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    53
 * A CompileUnit provides an anchor for all debugging
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    54
 * information generated during this instance of compilation.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    55
 * \param Lang          Source programming language, eg. LLVM_DW_LANG_C99.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    56
 *                      User-defined languages should start at 0x8000.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    57
 * \param File          File name
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    58
 * \param Dir           Directory
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    59
 * \param Producer      Identify the producer of debugging information
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    60
 *                      and code.  Usually this is a compiler
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    61
 *                      version string.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    62
 * \param isOptimized   A boolean flag which indicates whether optimization
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    63
 *                      is enabled or not.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    64
 * \param Flags         This string lists command line options. This
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    65
 *                      string is directly embedded in debug info
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    66
 *                      output which may be used by a tool
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    67
 *                      analyzing generated debugging information.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    68
 * \param RuntimeVersion This indicates runtime version for languages like
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    69
 *                      Objective-C.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    70
 *
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    71
 * \see LLVMDWARFLamguage
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    72
 * \see llvm::DIBuilder::createCompileUnit()
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
    73
 */
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
LLVMMetadataRef
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef D, unsigned Language,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
                               const char *File, const char *Dir,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
                               const char *Producer, int Optimized,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
                               const char *Flags, unsigned RuntimeVersion);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef D, const char *File,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
                                        const char *Dir);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
                                                LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
                                                LLVMMetadataRef File,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
                                                unsigned Line, unsigned Column);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
                                                    LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
                                                    LLVMMetadataRef File,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    91
                                                    unsigned Discriminator);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    92
54
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
    93
#if (LLVM_VERSION_MAJOR <= 3) && (LLVM_VERSION_MINOR <= 8)
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
LLVMMetadataRef LLVMDIBuilderCreateFunction(
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    95
    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    96
    const char *LinkageName, LLVMMetadataRef File, unsigned Line,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
    LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
    unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Function);
54
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
    99
#else
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   100
LLVMMetadataRef LLVMDIBuilderCreateFunction(
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   101
    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   102
    const char *LinkageName, LLVMMetadataRef File, unsigned Line,
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   103
    LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   104
    unsigned ScopeLine, unsigned Flags, int IsOptimized);
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   105
#endif
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
    LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
    const char *Name, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
    int AlwaysPreserve, unsigned Flags);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
    LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114
    const char *Name, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
    int AlwaysPreserve, unsigned Flags, unsigned ArgNo);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
32
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   118
/**
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   119
 * Create debugging information entry for a basic type.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   120
 *
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   121
 * \param Name        Type name.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   122
 * \param SizeInBits  Size of the type.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   123
 * \param AlignInBits Type alignment.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   124
 * \param Encoding    DWARF encoding code, e.g. LLVM_DW_ATE_float.
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   125
 */
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
                                             const char *Name,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
                                             uint64_t SizeInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
                                             uint64_t AlignInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
                                             unsigned Encoding);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
                                               LLVMMetadataRef PointeeType,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
                                               uint64_t SizeInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
                                               uint64_t AlignInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
                                               const char *Name);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
54
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   138
#if (LLVM_VERSION_MAJOR <= 3) && (LLVM_VERSION_MINOR <= 8)
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
LLVMMetadataRef
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef File,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
                                  LLVMMetadataRef ParameterTypes);
54
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   142
#else
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   143
LLVMMetadataRef
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   144
LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef ParameterTypes);
a288aced3dd1 LLVM C API Extensions: Fixed DIBuilerCreateFunction() and DIBuilderCreateSubroutineType() for LLVM 3.9
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 32
diff changeset
   145
#endif
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
LLVMMetadataRef LLVMDIBuilderCreateStructType(
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
    LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
    uint64_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
    LLVMMetadataRef ElementTypes);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
    LLVMDIBuilderRef D, unsigned Tag, const char *Name, LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
    LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
    uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
LLVMMetadataRef
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
                              const char *Name, LLVMMetadataRef File,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
                              unsigned Line, uint64_t SizeInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
                              uint64_t AlignInBits, uint64_t OffsetInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
                              unsigned Flags, LLVMMetadataRef Ty);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
                                             uint64_t SizeInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
                                             uint64_t AlignInBits,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
                                             LLVMMetadataRef ElementType,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   169
                                             LLVMMetadataRef Subscripts);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
                                           LLVMMetadataRef Ty, const char *Name,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
                                           LLVMMetadataRef File, unsigned Line,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
                                           LLVMMetadataRef Context);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef D, int64_t Lo,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
                                                 int64_t Count);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   178
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
                                              LLVMMetadataRef *Data,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
                                              size_t Length);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
                                                  LLVMMetadataRef *Data,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
                                                  size_t Length);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   187
LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Dref,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
                                              int64_t *Addr, size_t Length);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
                                             LLVMValueRef Storage,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
                                             LLVMMetadataRef VarInfo,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
                                             LLVMMetadataRef Expr,
32
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   194
											 LLVMMetadataRef Location,
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
                                             LLVMBasicBlockRef Block);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef D, LLVMValueRef Val,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
                                           uint64_t Offset,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
                                           LLVMMetadataRef VarInfo,
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
                                           LLVMMetadataRef Expr,
32
1378060fadd6 LLVM C API Extensions: fixed LLVMDIBuilderInsert*AtEnd() functions for LLVM 3.8
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 26
diff changeset
   201
										   LLVMMetadataRef Location,
26
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
                                           LLVMBasicBlockRef Block);
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
#ifdef __cplusplus
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
} // extern "C"
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
#endif
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   207
f6379df4b5ea Added DIBuilder API to LLVM C Ext library
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   208
#endif