[llvm] 8823581 - [Bindings][Go] Fix go.test failure due to missing argument
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 18 17:07:51 PST 2019
Author: Kai Luo
Date: 2019-11-19T09:07:37+08:00
New Revision: 88235812a71d99c082e7aa2ef9356d43d1f83a80
URL: https://github.com/llvm/llvm-project/commit/88235812a71d99c082e7aa2ef9356d43d1f83a80
DIFF: https://github.com/llvm/llvm-project/commit/88235812a71d99c082e7aa2ef9356d43d1f83a80.diff
LOG: [Bindings][Go] Fix go.test failure due to missing argument
go.test failed with error
```
/tmp/gopath431502532/src/llvm.org/llvm/bindings/go/llvm/dibuilder.go:514:40: not enough arguments in call to _Cfunc_LLVMDIBuilderCreateTypedef
have (_Ctype_LLVMDIBuilderRef, _Ctype_LLVMMetadataRef, *_Ctype_char, _Ctype_ulong, _Ctype_LLVMMetadataRef, _Ctype_uint, _Ctype_LLVMMetadataRef)
want (*_Ctype_struct_LLVMOpaqueDIBuilder, *_Ctype_struct_LLVMOpaqueMetadata, *_Ctype_char, _Ctype_ulong, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint, *_Ctype_struct_LLVMOpaqueMetadata, _Ctype_uint)
```
This patch fixes above error.
Differential Revision: https://reviews.llvm.org/D70360
Added:
Modified:
llvm/bindings/go/llvm/dibuilder.go
Removed:
################################################################################
diff --git a/llvm/bindings/go/llvm/dibuilder.go b/llvm/bindings/go/llvm/dibuilder.go
index 2c6bee411c0e..e32d69490833 100644
--- a/llvm/bindings/go/llvm/dibuilder.go
+++ b/llvm/bindings/go/llvm/dibuilder.go
@@ -500,11 +500,12 @@ func (d *DIBuilder) CreateArrayType(t DIArrayType) Metadata {
// DITypedef holds the values for creating typedef type debug metadata.
type DITypedef struct {
- Type Metadata
- Name string
- File Metadata
- Line int
- Context Metadata
+ Type Metadata
+ Name string
+ File Metadata
+ Line int
+ Context Metadata
+ AlignInBits int
}
// CreateTypedef creates typedef type debug metadata.
@@ -519,6 +520,7 @@ func (d *DIBuilder) CreateTypedef(t DITypedef) Metadata {
t.File.C,
C.unsigned(t.Line),
t.Context.C,
+ C.unsigned(t.AlignInBits),
)
return Metadata{C: result}
}
More information about the llvm-commits
mailing list