Fix for go bindings header to match previous commit.
[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 "IRBindings.h"
18 #include "llvm-c/Core.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 // FIXME: These bindings shouldn't be Go-specific and should eventually move to
25 // a (somewhat) less stable collection of C APIs for use in creating bindings of
26 // LLVM in other languages.
27
28 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
29
30 LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
31
32 void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
33
34 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
35                                                 LLVMMetadataRef Scope,
36                                                 LLVMMetadataRef File,
37                                                 unsigned Line, unsigned Column);
38
39 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
40                                                     LLVMMetadataRef Scope,
41                                                     LLVMMetadataRef File,
42                                                     unsigned Discriminator);
43
44 LLVMMetadataRef LLVMDIBuilderCreateFunction(
45     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
46     const char *LinkageName, LLVMMetadataRef File, unsigned Line,
47     LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
48     unsigned ScopeLine, unsigned Flags, int IsOptimized);
49
50 LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
51     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
52     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
53     unsigned Flags, uint32_t AlignInBits);
54
55 LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
56     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
57     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
58     unsigned Flags);
59
60 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
61                                              const char *Name,
62                                              uint64_t SizeInBits,
63                                              unsigned Encoding);
64
65 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
66                                                LLVMMetadataRef PointeeType,
67                                                uint64_t SizeInBits,
68                                                uint32_t AlignInBits,
69                                                const char *Name);
70
71 LLVMMetadataRef
72 LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef File,
73                                   LLVMMetadataRef ParameterTypes);
74
75 LLVMMetadataRef LLVMDIBuilderCreateStructType(
76     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
77     LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
78     uint32_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
79     LLVMMetadataRef ElementTypes);
80
81 LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(
82     LLVMDIBuilderRef D, unsigned Tag, const char *Name, LLVMMetadataRef Scope,
83     LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang,
84     uint64_t SizeInBits, uint32_t AlignInBits, unsigned Flags);
85
86 LLVMMetadataRef
87 LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
88                               const char *Name, LLVMMetadataRef File,
89                               unsigned Line, uint64_t SizeInBits,
90                               uint32_t AlignInBits, uint64_t OffsetInBits,
91                               unsigned Flags, LLVMMetadataRef Ty);
92
93 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
94                                              uint64_t SizeInBits,
95                                              uint32_t AlignInBits,
96                                              LLVMMetadataRef ElementType,
97                                              LLVMMetadataRef Subscripts);
98
99 LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D,
100                                            LLVMMetadataRef Ty, const char *Name,
101                                            LLVMMetadataRef File, unsigned Line,
102                                            LLVMMetadataRef Context);
103
104 LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef D, int64_t Lo,
105                                                  int64_t Count);
106
107 LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef D,
108                                               LLVMMetadataRef *Data,
109                                               size_t Length);
110
111 LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef D,
112                                                   LLVMMetadataRef *Data,
113                                                   size_t Length);
114
115 LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Dref,
116                                               int64_t *Addr, size_t Length);
117
118 LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
119                                              LLVMValueRef Storage,
120                                              LLVMMetadataRef VarInfo,
121                                              LLVMMetadataRef Expr,
122                                              LLVMBasicBlockRef Block);
123
124 LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef D, LLVMValueRef Val,
125                                            LLVMMetadataRef VarInfo,
126                                            LLVMMetadataRef Expr,
127                                            LLVMBasicBlockRef Block);
128
129 #ifdef __cplusplus
130 } // extern "C"
131 #endif
132
133 #endif