Add C API bindings for DIBuilder 'Type' APIs
[lldb.git] / llvm / bindings / go / llvm / DIBuilderBindings.h
index 8a8ce3f..a3063fa 100644 (file)
@@ -14,8 +14,9 @@
 #ifndef LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
 #define LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
 
-#include "llvm-c/Core.h"
 #include "IRBindings.h"
+#include "llvm-c/Core.h"
+#include "llvm-c/DebugInfo.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -27,20 +28,6 @@ extern "C" {
 
 typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
 
-LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef m);
-
-void LLVMDIBuilderDestroy(LLVMDIBuilderRef d);
-void LLVMDIBuilderFinalize(LLVMDIBuilderRef d);
-
-LLVMMetadataRef
-LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef D, unsigned Language,
-                               const char *File, const char *Dir,
-                               const char *Producer, int Optimized,
-                               const char *Flags, unsigned RuntimeVersion);
-
-LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef D, const char *File,
-                                        const char *Dir);
-
 LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef D,
                                                 LLVMMetadataRef Scope,
                                                 LLVMMetadataRef File,
@@ -55,47 +42,17 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction(
     LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
     const char *LinkageName, LLVMMetadataRef File, unsigned Line,
     LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
-    unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Function);
+    unsigned ScopeLine, unsigned Flags, int IsOptimized);
 
-LLVMMetadataRef LLVMDIBuilderCreateLocalVariable(
-    LLVMDIBuilderRef D, unsigned Tag, LLVMMetadataRef Scope, const char *Name,
+LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
+    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
     LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
-    unsigned Flags, unsigned ArgNo);
-
-LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
-                                             const char *Name,
-                                             uint64_t SizeInBits,
-                                             uint64_t AlignInBits,
-                                             unsigned Encoding);
-
-LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
-                                               LLVMMetadataRef PointeeType,
-                                               uint64_t SizeInBits,
-                                               uint64_t AlignInBits,
-                                               const char *Name);
+    unsigned Flags, uint32_t AlignInBits);
 
-LLVMMetadataRef
-LLVMDIBuilderCreateSubroutineType(LLVMDIBuilderRef D, LLVMMetadataRef File,
-                                  LLVMMetadataRef ParameterTypes);
-
-LLVMMetadataRef LLVMDIBuilderCreateStructType(
-    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
-    LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
-    uint64_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
-    LLVMMetadataRef ElementTypes);
-
-LLVMMetadataRef
-LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
-                              const char *Name, LLVMMetadataRef File,
-                              unsigned Line, uint64_t SizeInBits,
-                              uint64_t AlignInBits, uint64_t OffsetInBits,
-                              unsigned Flags, LLVMMetadataRef Ty);
-
-LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
-                                             uint64_t SizeInBits,
-                                             uint64_t AlignInBits,
-                                             LLVMMetadataRef ElementType,
-                                             LLVMMetadataRef Subscripts);
+LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
+    LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
+    LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
+    unsigned Flags);
 
 LLVMMetadataRef LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D,
                                            LLVMMetadataRef Ty, const char *Name,
@@ -123,7 +80,6 @@ LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
                                              LLVMBasicBlockRef Block);
 
 LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef D, LLVMValueRef Val,
-                                           uint64_t Offset,
                                            LLVMMetadataRef VarInfo,
                                            LLVMMetadataRef Expr,
                                            LLVMBasicBlockRef Block);