From: Josh Bleecher Snyder Date: Wed, 4 Mar 2020 15:24:56 +0000 (-0800) Subject: cmd/compile: make ssa.Edge a stringer X-Git-Tag: go1.15beta1~922 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b5c66de0892d0e9f3f59126eeebc31070e79143b;p=gostls13.git cmd/compile: make ssa.Edge a stringer To aid in debugging. Change-Id: I2330499b5f2ecbeb02f7e3bc0b17ded755d5c685 Reviewed-on: https://go-review.googlesource.com/c/go/+/222617 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/ssa/block.go b/src/cmd/compile/internal/ssa/block.go index 205fcfc707..c1a734b20b 100644 --- a/src/cmd/compile/internal/ssa/block.go +++ b/src/cmd/compile/internal/ssa/block.go @@ -101,6 +101,9 @@ func (e Edge) Block() *Block { func (e Edge) Index() int { return e.i } +func (e Edge) String() string { + return fmt.Sprintf("{%v,%d}", e.b, e.i) +} // kind controls successors // ------------------------------------------