Skip to content

Commit 8823581

Browse files
author
Kai Luo
committed
[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
1 parent a921f58 commit 8823581

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/bindings/go/llvm/dibuilder.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,12 @@ func (d *DIBuilder) CreateArrayType(t DIArrayType) Metadata {
500500

501501
// DITypedef holds the values for creating typedef type debug metadata.
502502
type DITypedef struct {
503-
Type Metadata
504-
Name string
505-
File Metadata
506-
Line int
507-
Context Metadata
503+
Type Metadata
504+
Name string
505+
File Metadata
506+
Line int
507+
Context Metadata
508+
AlignInBits int
508509
}
509510

510511
// CreateTypedef creates typedef type debug metadata.
@@ -519,6 +520,7 @@ func (d *DIBuilder) CreateTypedef(t DITypedef) Metadata {
519520
t.File.C,
520521
C.unsigned(t.Line),
521522
t.Context.C,
523+
C.unsigned(t.AlignInBits),
522524
)
523525
return Metadata{C: result}
524526
}

0 commit comments

Comments
 (0)