]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: report functions declared in Go and assembly
authorMatthew Dempsky <mdempsky@google.com>
Thu, 8 Jul 2021 06:32:49 +0000 (23:32 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Sat, 10 Jul 2021 00:13:14 +0000 (00:13 +0000)
commita12ad271195d88ffa8f68ad01547560fb4d2ab49
treef7ab1ee30f50471e0f0229e3c4dadd536bbf3f6b
parent5059aed9dd33e35d3d0d88be945b2aed8265e1c3
[dev.typeparams] cmd/compile: report functions declared in Go and assembly

This CL reuses the symabi wrapper information to warn when a function
is defined both in Go (i.e., has a function declaration with a body)
and in assembly (i.e., has a TEXT instruction).

This will eventually produce a linker error anyway, but we can provide
a slightly nicer error message earlier.

Change-Id: Ia107f813343c0b10f4cd1013e7c72e67149ee52e
Reviewed-on: https://go-review.googlesource.com/c/go/+/333454
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ssagen/abi.go