[PATCH] D70360: [Bindings][Go] Fix go.test failure due to missing argument

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 16 18:06:09 PST 2019


lkail created this revision.
lkail added reviewers: kristina, pcc.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

go.test failed with error

  # llvm.org/llvm/bindings/go/llvm [llvm.org/llvm/bindings/go/llvm.test]
  /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 this error.


https://reviews.llvm.org/D70360

Files:
  llvm/bindings/go/llvm/dibuilder.go


Index: llvm/bindings/go/llvm/dibuilder.go
===================================================================
--- llvm/bindings/go/llvm/dibuilder.go
+++ llvm/bindings/go/llvm/dibuilder.go
@@ -500,11 +500,12 @@
 
 // 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 @@
 		t.File.C,
 		C.unsigned(t.Line),
 		t.Context.C,
+		C.unsigned(t.AlignInBits),
 	)
 	return Metadata{C: result}
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70360.229706.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191117/ca68dc09/attachment.bin>


More information about the llvm-commits mailing list