[X86] Cleanup ADCX/ADOX instruction definitions.
[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 #include "llvm-c/DebugInfo.h"
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 // FIXME: These bindings shouldn't be Go-specific and should eventually move to
26 // a (somewhat) less stable collection of C APIs for use in creating bindings of
27 // LLVM in other languages.
28
29 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
30
31 LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
32
33 void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
34
35 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
36                                                 LLVMMetadataRef Scope,
37                                                 LLVMMetadataRef File,
38                                                 unsigned Line, unsigned Column);
39
40 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
41                                                     LLVMMetadataRef Scope,
42                                                     LLVMMetadataRef File,
43                                                     unsigned Discriminator);
44
45 LLVMMetadataRef LLVMDIBuilderCreateFunction(
46     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
47     const char *LinkageName, LLVMMetadataRef File, unsigned Line,
48     LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
49     unsigned ScopeLine, unsigned Flags, int IsOptimized);
50
51 LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
52     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
53     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
54     unsigned Flags, uint32_t AlignInBits);
55
56 LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
57     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
58     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
59     unsigned Flags);
60
61 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
62                                              const char *Name,
63                                              uint64_t SizeInBits,
64                                              unsigned Encoding);
65
66 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
67                                                LLVMMetadataRef PointeeType,
68                                                uint64_t SizeInBits,
69                                                uint32_t AlignInBits,
70                                                const char *Name);
71
72 LLVMMetadataRef
73 LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef File,
74                                   LLVMMetadataRef ParameterTypes);
75
76 LLVMMetadataRef LLVMDIBuilderCreateStructType(
77     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
78     LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
79     uint32_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
80     LLVMMetadataRef ElementTypes);
81
82 LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(
83     LLVMDIBuilderRef D, unsigned Tag, const char *Name, LLVMMetadataRef Scope,
84     LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang,
85     uint64_t SizeInBits, uint32_t AlignInBits, unsigned Flags);
86
87 LLVMMetadataRef
88 LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
89                               const char *Name, LLVMMetadataRef File,
90                               unsigned Line, uint64_t SizeInBits,
91                               uint32_t AlignInBits, uint64_t OffsetInBits,
92                               unsigned Flags, LLVMMetadataRef Ty);
93
94 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
95                                              uint64_t SizeInBits,
96                                              uint32_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                                            LLVMMetadataRef VarInfo,
127                                            LLVMMetadataRef Expr,
128                                            LLVMBasicBlockRef Block);
129
130 #ifdef __cplusplus
131 } // extern "C"
132 #endif
133
134 #endif