From: Cherry Mui Date: Mon, 13 Sep 2021 20:23:28 +0000 (-0400) Subject: cmd/compile: fix LocResults formatting X-Git-Tag: go1.18beta1~1330 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=48e2b1ea91;p=gostls13.git cmd/compile: fix LocResults formatting When a LocResults is an empty list, it currently prints as ">". Make it print "<>". Change-Id: I0f596791b471d74cd4bbc0059e269708c80592dd Reviewed-on: https://go-review.googlesource.com/c/go/+/350144 Trust: Cherry Mui Run-TryBot: Cherry Mui TryBot-Result: Go Bot Reviewed-by: David Chase --- diff --git a/src/cmd/compile/internal/ssa/location.go b/src/cmd/compile/internal/ssa/location.go index 252c47cdeb..b575febd72 100644 --- a/src/cmd/compile/internal/ssa/location.go +++ b/src/cmd/compile/internal/ssa/location.go @@ -91,8 +91,8 @@ func (t LocPair) String() string { type LocResults []Location func (t LocResults) String() string { - s := "<" - a := "" + s := "" + a := "<" for _, r := range t { a += s s = ","