Skip to content

Commit ecc06f0

Browse files
committed
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 <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 0909bcd commit ecc06f0

File tree

1 file changed

+1
-1
lines changed
  • src/cmd/compile/internal/ssagen

1 file changed

+1
-1
lines changed

src/cmd/compile/internal/ssagen/ssa.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func buildssa(fn *ir.Func, worker int, isPgoHot bool) *ssa.Func {
317317
// optionally allows an ABI suffix specification in the GOSSAHASH, e.g. "(*Reader).Reset<0>" etc
318318
if strings.Contains(ssaDump, name) { // in all the cases the function name is entirely contained within the GOSSAFUNC string.
319319
nameOptABI := name
320-
if strings.Contains(ssaDump, ",") { // ABI specification
320+
if l := len(ssaDump); l > 1 && ssaDump[l-2] == ',' { // ABI specification
321321
nameOptABI = ssa.FuncNameABI(name, abiSelf.Which())
322322
} else if strings.HasSuffix(ssaDump, ">") { // if they use the linker syntax instead....
323323
l := len(ssaDump)

0 commit comments

Comments
 (0)