forked from OSchip/llvm-project
[Go bindings] Update for r284678 API changes.
Alignment moved from createBasicType to createAutoVariable. llvm-svn: 284707
This commit is contained in:
parent
05ac4c445c
commit
656d821aa8
llvm/bindings/go/llvm
|
@ -83,15 +83,15 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction(
|
||||||
ScopeLine, static_cast<DINode::DIFlags>(Flags), IsOptimized));
|
ScopeLine, static_cast<DINode::DIFlags>(Flags), IsOptimized));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMMetadataRef
|
LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
|
||||||
LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
|
LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name,
|
||||||
const char *Name, LLVMMetadataRef File,
|
LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
|
||||||
unsigned Line, LLVMMetadataRef Ty,
|
unsigned Flags, uint32_t AlignInBits) {
|
||||||
int AlwaysPreserve, unsigned Flags) {
|
|
||||||
DIBuilder *D = unwrap(Dref);
|
DIBuilder *D = unwrap(Dref);
|
||||||
return wrap(D->createAutoVariable(
|
return wrap(
|
||||||
unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File), Line,
|
D->createAutoVariable(unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File),
|
||||||
unwrap<DIType>(Ty), AlwaysPreserve, static_cast<DINode::DIFlags>(Flags)));
|
Line, unwrap<DIType>(Ty), AlwaysPreserve,
|
||||||
|
static_cast<DINode::DIFlags>(Flags), AlignInBits));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
||||||
|
@ -107,10 +107,9 @@ LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
||||||
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
|
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
|
||||||
const char *Name,
|
const char *Name,
|
||||||
uint64_t SizeInBits,
|
uint64_t SizeInBits,
|
||||||
uint32_t AlignInBits,
|
|
||||||
unsigned Encoding) {
|
unsigned Encoding) {
|
||||||
DIBuilder *D = unwrap(Dref);
|
DIBuilder *D = unwrap(Dref);
|
||||||
return wrap(D->createBasicType(Name, SizeInBits, AlignInBits, Encoding));
|
return wrap(D->createBasicType(Name, SizeInBits, Encoding));
|
||||||
}
|
}
|
||||||
|
|
||||||
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
|
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
|
||||||
|
|
|
@ -57,11 +57,10 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction(
|
||||||
LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
|
LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
|
||||||
unsigned ScopeLine, unsigned Flags, int IsOptimized);
|
unsigned ScopeLine, unsigned Flags, int IsOptimized);
|
||||||
|
|
||||||
LLVMMetadataRef
|
LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
|
||||||
LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
|
LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
|
||||||
const char *Name, LLVMMetadataRef File,
|
LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
|
||||||
unsigned Line, LLVMMetadataRef Ty,
|
unsigned Flags, uint32_t AlignInBits);
|
||||||
int AlwaysPreserve, unsigned Flags);
|
|
||||||
|
|
||||||
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
||||||
LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
|
LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
|
||||||
|
@ -71,7 +70,6 @@ LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
|
||||||
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
|
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
|
||||||
const char *Name,
|
const char *Name,
|
||||||
uint64_t SizeInBits,
|
uint64_t SizeInBits,
|
||||||
uint32_t AlignInBits,
|
|
||||||
unsigned Encoding);
|
unsigned Encoding);
|
||||||
|
|
||||||
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
|
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
|
||||||
|
|
|
@ -222,6 +222,7 @@ type DIAutoVariable struct {
|
||||||
Type Metadata
|
Type Metadata
|
||||||
AlwaysPreserve bool
|
AlwaysPreserve bool
|
||||||
Flags int
|
Flags int
|
||||||
|
AlignInBits uint32
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateAutoVariable creates local variable debug metadata.
|
// CreateAutoVariable creates local variable debug metadata.
|
||||||
|
@ -237,6 +238,7 @@ func (d *DIBuilder) CreateAutoVariable(scope Metadata, v DIAutoVariable) Metadat
|
||||||
v.Type.C,
|
v.Type.C,
|
||||||
boolToCInt(v.AlwaysPreserve),
|
boolToCInt(v.AlwaysPreserve),
|
||||||
C.unsigned(v.Flags),
|
C.unsigned(v.Flags),
|
||||||
|
C.uint32_t(v.AlignInBits),
|
||||||
)
|
)
|
||||||
return Metadata{C: result}
|
return Metadata{C: result}
|
||||||
}
|
}
|
||||||
|
@ -275,10 +277,9 @@ func (d *DIBuilder) CreateParameterVariable(scope Metadata, v DIParameterVariabl
|
||||||
|
|
||||||
// DIBasicType holds the values for creating basic type debug metadata.
|
// DIBasicType holds the values for creating basic type debug metadata.
|
||||||
type DIBasicType struct {
|
type DIBasicType struct {
|
||||||
Name string
|
Name string
|
||||||
SizeInBits uint64
|
SizeInBits uint64
|
||||||
AlignInBits uint32
|
Encoding DwarfTypeEncoding
|
||||||
Encoding DwarfTypeEncoding
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateBasicType creates basic type debug metadata.
|
// CreateBasicType creates basic type debug metadata.
|
||||||
|
@ -289,7 +290,6 @@ func (d *DIBuilder) CreateBasicType(t DIBasicType) Metadata {
|
||||||
d.ref,
|
d.ref,
|
||||||
name,
|
name,
|
||||||
C.uint64_t(t.SizeInBits),
|
C.uint64_t(t.SizeInBits),
|
||||||
C.uint32_t(t.AlignInBits),
|
|
||||||
C.unsigned(t.Encoding),
|
C.unsigned(t.Encoding),
|
||||||
)
|
)
|
||||||
return Metadata{C: result}
|
return Metadata{C: result}
|
||||||
|
|
Loading…
Reference in New Issue