]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/pkginit: fix typecheck.DeclFunc call
authorMatthew Dempsky <mdempsky@google.com>
Thu, 5 May 2022 18:54:11 +0000 (11:54 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 5 May 2022 19:09:47 +0000 (19:09 +0000)
CL 403935 changed the API for typecheck.DeclFunc, while CL 403851 was
submitted in the mean time and added another call to it.

Change-Id: I0de59f34197bf241c1dd42cffbab7a91f9eb825d
Reviewed-on: https://go-review.googlesource.com/c/go/+/404434
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/pkginit/init.go

index 9cd3e74abeba94a941dd2431a88476bdfc502fcf..67942c37c09e19a60de8c842e415b8244798df90 100644 (file)
@@ -107,7 +107,7 @@ func Task() *ir.Name {
                        base.Pos = base.AutogeneratedPos
                        typecheck.DeclContext = ir.PEXTERN
                        name := noder.Renameinit()
-                       fnInit := typecheck.DeclFunc(name, ir.NewFuncType(base.Pos, nil, nil, nil))
+                       fnInit := typecheck.DeclFunc(name, nil, nil, nil)
 
                        // Get an array of intrumented global variables.
                        globals := instrumentGlobals(fnInit)