From 5403b8ecebc37da227dae170f01b6004a66bf2e6 Mon Sep 17 00:00:00 2001 From: Yury Smolsky <yury@smolsky.by> Date: Sat, 28 Jul 2018 00:26:42 +0300 Subject: [PATCH] cmd/compile: remove empty branches Change-Id: Id87d9f55d1714fc553f5b1a9cba0f2fe348dad3e Reviewed-on: https://go-review.googlesource.com/126396 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> --- src/cmd/compile/internal/ssa/debug.go | 5 ----- src/cmd/compile/internal/ssa/redblack32_test.go | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/cmd/compile/internal/ssa/debug.go b/src/cmd/compile/internal/ssa/debug.go index becee358b6..c1fbdcc517 100644 --- a/src/cmd/compile/internal/ssa/debug.go +++ b/src/cmd/compile/internal/ssa/debug.go @@ -535,8 +535,6 @@ func (state *debugState) mergePredecessors(b *Block, blockLocs []*BlockDebug) ([ } if len(preds) == 0 { - if state.loggingEnabled { - } state.currentState.reset(nil) return nil, true } @@ -854,7 +852,6 @@ func (state *debugState) buildLocationLists(blockLocs []*BlockDebug) { } state.changedVars.clear() } - } if state.loggingEnabled { @@ -914,8 +911,6 @@ func (state *debugState) updateVar(varID VarID, v *Value, curLoc []VarLoc) { for i, slot := range state.varSlots[varID] { pending.pieces[i] = curLoc[slot] } - return - } // writePendingEntry writes out the pending entry for varID, if any, diff --git a/src/cmd/compile/internal/ssa/redblack32_test.go b/src/cmd/compile/internal/ssa/redblack32_test.go index 6d72a3eee5..1ec2976072 100644 --- a/src/cmd/compile/internal/ssa/redblack32_test.go +++ b/src/cmd/compile/internal/ssa/redblack32_test.go @@ -175,8 +175,6 @@ func allRBT32Ops(te *testing.T, x []int32) { if s != "" { te.Errorf("Tree consistency problem at %v", s) return - } else { - // fmt.Printf("%s", t.DebugString()) } } -- 2.30.9