llvm.org GIT mirror llvm / f00b783
[Go bindings] Update for r284678 API changes. Alignment moved from createBasicType to createAutoVariable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284707 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
3 changed file(s) with 19 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
8282 ScopeLine, static_cast(Flags), IsOptimized));
8383 }
8484
85 LLVMMetadataRef
86 LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
87 const char *Name, LLVMMetadataRef File,
88 unsigned Line, LLVMMetadataRef Ty,
89 int AlwaysPreserve, unsigned Flags) {
90 DIBuilder *D = unwrap(Dref);
91 return wrap(D->createAutoVariable(
92 unwrap(Scope), Name, unwrap(File), Line,
93 unwrap(Ty), AlwaysPreserve, static_cast(Flags)));
85 LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
86 LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name,
87 LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
88 unsigned Flags, uint32_t AlignInBits) {
89 DIBuilder *D = unwrap(Dref);
90 return wrap(
91 D->createAutoVariable(unwrap(Scope), Name, unwrap(File),
92 Line, unwrap(Ty), AlwaysPreserve,
93 static_cast(Flags), AlignInBits));
9494 }
9595
9696 LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
106106 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
107107 const char *Name,
108108 uint64_t SizeInBits,
109 uint32_t AlignInBits,
110109 unsigned Encoding) {
111110 DIBuilder *D = unwrap(Dref);
112 return wrap(D->createBasicType(Name, SizeInBits, AlignInBits, Encoding));
111 return wrap(D->createBasicType(Name, SizeInBits, Encoding));
113112 }
114113
115114 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
5656 LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
5757 unsigned ScopeLine, unsigned Flags, int IsOptimized);
5858
59 LLVMMetadataRef
60 LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
61 const char *Name, LLVMMetadataRef File,
62 unsigned Line, LLVMMetadataRef Ty,
63 int AlwaysPreserve, unsigned Flags);
59 LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
60 LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
61 LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
62 unsigned Flags, uint32_t AlignInBits);
6463
6564 LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
6665 LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
7069 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
7170 const char *Name,
7271 uint64_t SizeInBits,
73 uint32_t AlignInBits,
7472 unsigned Encoding);
7573
7674 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
221221 Type Metadata
222222 AlwaysPreserve bool
223223 Flags int
224 AlignInBits uint32
224225 }
225226
226227 // CreateAutoVariable creates local variable debug metadata.
236237 v.Type.C,
237238 boolToCInt(v.AlwaysPreserve),
238239 C.unsigned(v.Flags),
240 C.uint32_t(v.AlignInBits),
239241 )
240242 return Metadata{C: result}
241243 }
274276
275277 // DIBasicType holds the values for creating basic type debug metadata.
276278 type DIBasicType struct {
277 Name string
278 SizeInBits uint64
279 AlignInBits uint32
280 Encoding DwarfTypeEncoding
279 Name string
280 SizeInBits uint64
281 Encoding DwarfTypeEncoding
281282 }
282283
283284 // CreateBasicType creates basic type debug metadata.
288289 d.ref,
289290 name,
290291 C.uint64_t(t.SizeInBits),
291 C.uint32_t(t.AlignInBits),
292292 C.unsigned(t.Encoding),
293293 )
294294 return Metadata{C: result}