From b5c66de0892d0e9f3f59126eeebc31070e79143b Mon Sep 17 00:00:00 2001 From: Josh Bleecher Snyder Date: Wed, 4 Mar 2020 07:24:56 -0800 Subject: [PATCH] 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 --- src/cmd/compile/internal/ssa/block.go | 3 +++ 1 file changed, 3 insertions(+) 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 // ------------------------------------------ -- 2.50.0