]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: print readable function name in error message
authordoujiang24 <doujiang24@gmail.com>
Wed, 26 Oct 2022 06:06:43 +0000 (06:06 +0000)
committerGopher Robot <gobot@golang.org>
Wed, 26 Oct 2022 19:11:37 +0000 (19:11 +0000)
i.e.
from "function %!s(*Node=0xc0003b48c0) cannot have ABI wrappers", to "function xxFunctionName cannot have ABI wrappers".

Change-Id: I83cfdf1916e82ab1455db8032153d9cdae85250d
GitHub-Last-Rev: 87b077653f8731be511861d968bd31d58744b386
GitHub-Pull-Request: golang/go#56428
Reviewed-on: https://go-review.googlesource.com/c/go/+/445516
Auto-Submit: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ssagen/abi.go

index 3a767d6d1ce30c03c3938864a2f3b0e0f0a08d68..84d5b5951c2faa161ec878b2f347f0f1ec2dbcf7 100644 (file)
@@ -204,7 +204,7 @@ func (s *SymABIs) GenABIWrappers() {
                // Double check that cgo-exported symbols don't get
                // any wrappers.
                if len(cgoExport) > 0 && fn.ABIRefs&^obj.ABISetOf(fn.ABI) != 0 {
-                       base.Fatalf("cgo exported function %s cannot have ABI wrappers", fn)
+                       base.Fatalf("cgo exported function %v cannot have ABI wrappers", fn)
                }
 
                if !buildcfg.Experiment.RegabiWrappers {