aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorDavid Chase <drchase@google.com>2025-04-08 11:38:01 +1000
committerDavid Chase <drchase@google.com>2025-04-09 00:32:10 -0700
commitecc06f0db79193a4fe16138148c7eb26d9af96f1 (patch)
treedf35aed107a5e7c0def4d6eacf94b1e359daad93 /src/cmd
parent0909bcd9e4acb01089d588d608d669d69710e50a (diff)
downloadgo-ecc06f0db79193a4fe16138148c7eb26d9af96f1.tar.xz
cmd/compile: fix the test for ABI specification so it works right w/ generics
Change-Id: I09ef615bfe69a30fa8f7eef5f0a8ff94a244c920 Reviewed-on: https://go-review.googlesource.com/c/go/+/663776 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/compile/internal/ssagen/ssa.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go
index b7a9b7bea4..b0e0262d45 100644
--- a/src/cmd/compile/internal/ssagen/ssa.go
+++ b/src/cmd/compile/internal/ssagen/ssa.go
@@ -317,7 +317,7 @@ func buildssa(fn *ir.Func, worker int, isPgoHot bool) *ssa.Func {
// optionally allows an ABI suffix specification in the GOSSAHASH, e.g. "(*Reader).Reset<0>" etc
if strings.Contains(ssaDump, name) { // in all the cases the function name is entirely contained within the GOSSAFUNC string.
nameOptABI := name
- if strings.Contains(ssaDump, ",") { // ABI specification
+ if l := len(ssaDump); l > 1 && ssaDump[l-2] == ',' { // ABI specification
nameOptABI = ssa.FuncNameABI(name, abiSelf.Which())
} else if strings.HasSuffix(ssaDump, ">") { // if they use the linker syntax instead....
l := len(ssaDump)