Initial version of Go bindings.
[lldb.git] / llvm / bindings / go / llvm / DIBuilderBindings.h
1 //===- DIBuilderBindings.h - Bindings for DIBuilder -------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines C bindings for the DIBuilder class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
15 #define LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
16
17 #include "llvm-c/Core.h"
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 // FIXME: These bindings shouldn't be Go-specific and should eventually move to
24 // a (somewhat) less stable collection of C APIs for use in creating bindings of
25 // LLVM in other languages.
26
27 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
28
29 LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
30
31 void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
32 void LLVMDIBuilderFinalize(LLVMDIBuilderRef d);
33
34 LLVMValueRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef D,
35                                             unsigned Language, const char *File,
36                                             const char *Dir,
37                                             const char *Producer, int Optimized,
38                                             const char *Flags,
39                                             unsigned RuntimeVersion);
40
41 LLVMValueRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef D, const char *File,
42                                      const char *Dir);
43
44 LLVMValueRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
45                                              LLVMValueRef Scope,
46                                              LLVMValueRef File, unsigned Line,
47                                              unsigned Column);
48
49 LLVMValueRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
50                                                  LLVMValueRef Scope,
51                                                  LLVMValueRef File,
52                                                  unsigned Discriminator);
53
54 LLVMValueRef LLVMDIBuilderCreateFunction(
55     LLVMDIBuilderRef D, LLVMValueRef Scope, const char *Name,
56     const char *LinkageName, LLVMValueRef File, unsigned Line,
57     LLVMValueRef CompositeType, int IsLocalToUnit, int IsDefinition,
58     unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Function);
59
60 LLVMValueRef LLVMDIBuilderCreateLocalVariable(
61     LLVMDIBuilderRef D, unsigned Tag, LLVMValueRef Scope, const char *Name,
62     LLVMValueRef File, unsigned Line, LLVMValueRef Ty, int AlwaysPreserve,
63     unsigned Flags, unsigned ArgNo);
64
65 LLVMValueRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D, const char *Name,
66                                           uint64_t SizeInBits,
67                                           uint64_t AlignInBits,
68                                           unsigned Encoding);
69
70 LLVMValueRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
71                                             LLVMValueRef PointeeType,
72                                             uint64_t SizeInBits,
73                                             uint64_t AlignInBits,
74                                             const char *Name);
75
76 LLVMValueRef LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D,
77                                                LLVMValueRef File,
78                                                LLVMValueRef ParameterTypes);
79
80 LLVMValueRef LLVMDIBuilderCreateStructType(
81     LLVMDIBuilderRef D, LLVMValueRef Scope, const char *Name, LLVMValueRef File,
82     unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags,
83     LLVMValueRef DerivedFrom, LLVMValueRef ElementTypes);
84
85 LLVMValueRef LLVMDIBuilderCreateMemberType(
86     LLVMDIBuilderRef D, LLVMValueRef Scope, const char *Name, LLVMValueRef File,
87     unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
88     uint64_t OffsetInBits, unsigned Flags, LLVMValueRef Ty);
89
90 LLVMValueRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
91                                           uint64_t SizeInBits,
92                                           uint64_t AlignInBits,
93                                           LLVMValueRef ElementType,
94                                           LLVMValueRef Subscripts);
95
96 LLVMValueRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D, LLVMValueRef Ty,
97                                         const char *Name, LLVMValueRef File,
98                                         unsigned Line, LLVMValueRef Context);
99
100 LLVMValueRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef D, int64_t Lo,
101                                               int64_t Count);
102
103 LLVMValueRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef D,
104                                            LLVMValueRef *Data, size_t Length);
105
106 LLVMValueRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef D,
107                                                LLVMValueRef *Data,
108                                                size_t Length);
109
110 LLVMValueRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Dref, int64_t *Addr,
111                                            size_t Length);
112
113 LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
114                                              LLVMValueRef Storage,
115                                              LLVMValueRef VarInfo,
116                                              LLVMValueRef Expr,
117                                              LLVMBasicBlockRef Block);
118
119 #ifdef __cplusplus
120 }  // extern "C"
121 #endif
122
123 #endif