1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
//===- DIBuilderBindings.h - Bindings for DIBuilder -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines C bindings for the DIBuilder class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
#define LLVM_BINDINGS_GO_LLVM_DIBUILDERBINDINGS_H
#include "IRBindings.h"
#include "llvm-c/Core.h"
#ifdef __cplusplus
extern "C" {
#endif
// FIXME: These bindings shouldn't be Go-specific and should eventually move to
// a (somewhat) less stable collection of C APIs for use in creating bindings of
// LLVM in other languages.
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,
unsigned Line, unsigned Column);
LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef D,
LLVMMetadataRef Scope,
LLVMMetadataRef File,
unsigned Discriminator);
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);
LLVMMetadataRef LLVMDIBuilderCreateLocalVariable(
LLVMDIBuilderRef D, unsigned Tag, 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);
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 LLVMDIBuilderCreateReplaceableCompositeType(
LLVMDIBuilderRef D, unsigned Tag, const char *Name, LLVMMetadataRef Scope,
LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang,
uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags);
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 LLVMDIBuilderCreateTypedef(LLVMDIBuilderRef D,
LLVMMetadataRef Ty, const char *Name,
LLVMMetadataRef File, unsigned Line,
LLVMMetadataRef Context);
LLVMMetadataRef LLVMDIBuilderGetOrCreateSubrange(LLVMDIBuilderRef D, int64_t Lo,
int64_t Count);
LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(LLVMDIBuilderRef D,
LLVMMetadataRef *Data,
size_t Length);
LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(LLVMDIBuilderRef D,
LLVMMetadataRef *Data,
size_t Length);
LLVMMetadataRef LLVMDIBuilderCreateExpression(LLVMDIBuilderRef Dref,
int64_t *Addr, size_t Length);
LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef D,
LLVMValueRef Storage,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMBasicBlockRef Block);
LLVMValueRef LLVMDIBuilderInsertValueAtEnd(LLVMDIBuilderRef D, LLVMValueRef Val,
uint64_t Offset,
LLVMMetadataRef VarInfo,
LLVMMetadataRef Expr,
LLVMBasicBlockRef Block);
#ifdef __cplusplus
} // extern "C"
#endif
#endif
|