Re-sort the #include lines in bindings and examples which I managed to
[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 void LLVMDIBuilderFinalize(LLVMDIBuilderRef d);
34
35 LLVMMetadataRef
36 LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef D, unsigned Language,
37                                const char *File, const char *Dir,
38                                const char *Producer, int Optimized,
39                                const char *Flags, unsigned RuntimeVersion);
40
41 LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef D, const char *File,
42                                         const char *Dir);
43
44 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
45                                                 LLVMMetadataRef Scope,
46                                                 LLVMMetadataRef File,
47                                                 unsigned Line, unsigned Column);
48
49 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
50                                                     LLVMMetadataRef Scope,
51                                                     LLVMMetadataRef File,
52                                                     unsigned Discriminator);
53
54 LLVMMetadataRef LLVMDIBuilderCreateFunction(
55     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
56     const char *LinkageName, LLVMMetadataRef File, unsigned Line,
57     LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
58     unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Function);
59
60 LLVMMetadataRef LLVMDIBuilderCreateLocalVariable(
61     LLVMDIBuilderRef D, unsigned Tag, LLVMMetadataRef Scope, const char *Name,
62     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
63     unsigned Flags, unsigned ArgNo);
64
65 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
66                                              const char *Name,
67                                              uint64_t SizeInBits,
68                                              uint64_t AlignInBits,
69                                              unsigned Encoding);
70
71 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
72                                                LLVMMetadataRef PointeeType,
73                                                uint64_t SizeInBits,
74                                                uint64_t AlignInBits,
75                                                const char *Name);
76
77 LLVMMetadataRef
78 LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef File,
79                                   LLVMMetadataRef ParameterTypes);
80
81 LLVMMetadataRef LLVMDIBuilderCreateStructType(
82     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
83     LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
84     uint64_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
85     LLVMMetadataRef ElementTypes);
86
87 LLVMMetadataRef
88 LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
89                               const char *Name, LLVMMetadataRef File,
90                               unsigned Line, uint64_t SizeInBits,
91                               uint64_t AlignInBits, uint64_t OffsetInBits,
92                               unsigned Flags, LLVMMetadataRef Ty);
93
94 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
95                                              uint64_t SizeInBits,
96                                              uint64_t AlignInBits,
97                                              LLVMMetadataRef ElementType,
98                                              LLVMMetadataRef Subscripts);
99
100 LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D,
101                                            LLVMMetadataRef Ty, const char *Name,
102                                            LLVMMetadataRef File, unsigned Line,
103                                            LLVMMetadataRef Context);
104
105 LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef D, int64_t Lo,
106                                                  int64_t Count);
107
108 LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef D,
109                                               LLVMMetadataRef *Data,
110                                               size_t Length);
111
112 LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef D,
113                                                   LLVMMetadataRef *Data,
114                                                   size_t Length);
115
116 LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Dref,
117                                               int64_t *Addr, size_t Length);
118
119 LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
120                                              LLVMValueRef Storage,
121                                              LLVMMetadataRef VarInfo,
122                                              LLVMMetadataRef Expr,
123                                              LLVMBasicBlockRef Block);
124
125 LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef D, LLVMValueRef Val,
126                                            uint64_t Offset,
127                                            LLVMMetadataRef VarInfo,
128                                            LLVMMetadataRef Expr,
129                                            LLVMBasicBlockRef Block);
130
131 #ifdef __cplusplus
132 } // extern "C"
133 #endif
134
135 #endif