[llvm] r284707 - [Go bindings] Update for r284678 API changes.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 02:14:40 PDT 2016
Author: d0k
Date: Thu Oct 20 04:14:39 2016
New Revision: 284707
URL: http://llvm.org/viewvc/llvm-project?rev=284707&view=rev
Log:
[Go bindings] Update for r284678 API changes.
Alignment moved from createBasicType to createAutoVariable.
Modified:
llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp
llvm/trunk/bindings/go/llvm/DIBuilderBindings.h
llvm/trunk/bindings/go/llvm/dibuilder.go
Modified: llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp?rev=284707&r1=284706&r2=284707&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp (original)
+++ llvm/trunk/bindings/go/llvm/DIBuilderBindings.cpp Thu Oct 20 04:14:39 2016
@@ -83,15 +83,15 @@ LLVMMetadataRef LLVMDIBuilderCreateFunct
ScopeLine, static_cast<DINode::DIFlags>(Flags), IsOptimized));
}
-LLVMMetadataRef
-LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
- const char *Name, LLVMMetadataRef File,
- unsigned Line, LLVMMetadataRef Ty,
- int AlwaysPreserve, unsigned Flags) {
+LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
+ LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name,
+ LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
+ unsigned Flags, uint32_t AlignInBits) {
DIBuilder *D = unwrap(Dref);
- return wrap(D->createAutoVariable(
- unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File), Line,
- unwrap<DIType>(Ty), AlwaysPreserve, static_cast<DINode::DIFlags>(Flags)));
+ return wrap(
+ D->createAutoVariable(unwrap<DIScope>(Scope), Name, unwrap<DIFile>(File),
+ Line, unwrap<DIType>(Ty), AlwaysPreserve,
+ static_cast<DINode::DIFlags>(Flags), AlignInBits));
}
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
@@ -107,10 +107,9 @@ LLVMMetadataRef LLVMDIBuilderCreateParam
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
const char *Name,
uint64_t SizeInBits,
- uint32_t AlignInBits,
unsigned Encoding) {
DIBuilder *D = unwrap(Dref);
- return wrap(D->createBasicType(Name, SizeInBits, AlignInBits, Encoding));
+ return wrap(D->createBasicType(Name, SizeInBits, Encoding));
}
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
Modified: llvm/trunk/bindings/go/llvm/DIBuilderBindings.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/DIBuilderBindings.h?rev=284707&r1=284706&r2=284707&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/DIBuilderBindings.h (original)
+++ llvm/trunk/bindings/go/llvm/DIBuilderBindings.h Thu Oct 20 04:14:39 2016
@@ -57,11 +57,10 @@ LLVMMetadataRef LLVMDIBuilderCreateFunct
LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition,
unsigned ScopeLine, unsigned Flags, int IsOptimized);
-LLVMMetadataRef
-LLVMDIBuilderCreateAutoVariable(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
- const char *Name, LLVMMetadataRef File,
- unsigned Line, LLVMMetadataRef Ty,
- int AlwaysPreserve, unsigned Flags);
+LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
+ LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
+ LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, int AlwaysPreserve,
+ unsigned Flags, uint32_t AlignInBits);
LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name, unsigned ArgNo,
@@ -71,7 +70,6 @@ LLVMMetadataRef LLVMDIBuilderCreateParam
LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
const char *Name,
uint64_t SizeInBits,
- uint32_t AlignInBits,
unsigned Encoding);
LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
Modified: llvm/trunk/bindings/go/llvm/dibuilder.go
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/dibuilder.go?rev=284707&r1=284706&r2=284707&view=diff
==============================================================================
--- llvm/trunk/bindings/go/llvm/dibuilder.go (original)
+++ llvm/trunk/bindings/go/llvm/dibuilder.go Thu Oct 20 04:14:39 2016
@@ -222,6 +222,7 @@ type DIAutoVariable struct {
Type Metadata
AlwaysPreserve bool
Flags int
+ AlignInBits uint32
}
// CreateAutoVariable creates local variable debug metadata.
@@ -237,6 +238,7 @@ func (d *DIBuilder) CreateAutoVariable(s
v.Type.C,
boolToCInt(v.AlwaysPreserve),
C.unsigned(v.Flags),
+ C.uint32_t(v.AlignInBits),
)
return Metadata{C: result}
}
@@ -275,10 +277,9 @@ func (d *DIBuilder) CreateParameterVaria
// DIBasicType holds the values for creating basic type debug metadata.
type DIBasicType struct {
- Name string
- SizeInBits uint64
- AlignInBits uint32
- Encoding DwarfTypeEncoding
+ Name string
+ SizeInBits uint64
+ Encoding DwarfTypeEncoding
}
// CreateBasicType creates basic type debug metadata.
@@ -289,7 +290,6 @@ func (d *DIBuilder) CreateBasicType(t DI
d.ref,
name,
C.uint64_t(t.SizeInBits),
- C.uint32_t(t.AlignInBits),
C.unsigned(t.Encoding),
)
return Metadata{C: result}
More information about the llvm-commits
mailing list