From d199369aab38febae37bbd3faede4a3a53a32d95 Mon Sep 17 00:00:00 2001 From: David Chase Date: Thu, 2 May 2019 13:36:10 -0400 Subject: [PATCH] cmd/compile: make numberlines line mismatch check ignore columns This does not repair #31786, and in fact also unfixes the revert of CL 174617. We were just getting lucky when it looked like it was working. And unfortunately for the bug, there does not appear to be any particular problems with the line numbers; if anything they're a couple of extras, i.e., stepping might repeat, rather than skip. Delve works fine either way. Updates #31786. Change-Id: I5c2fdc2a0265bb99773b3a85492a3db557dffee4 Reviewed-on: https://go-review.googlesource.com/c/go/+/174948 Run-TryBot: David Chase TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- src/cmd/compile/internal/ssa/numberlines.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/ssa/numberlines.go b/src/cmd/compile/internal/ssa/numberlines.go index ef5e133206..9bdb357d35 100644 --- a/src/cmd/compile/internal/ssa/numberlines.go +++ b/src/cmd/compile/internal/ssa/numberlines.go @@ -149,7 +149,7 @@ func numberLines(f *Func) { } else { for _, p := range b.Preds { pbi := p.Block().ID - if endlines[pbi] != firstPos { + if endlines[pbi].Line() != firstPos.Line() || !endlines[pbi].SameFile(firstPos) { b.Values[firstPosIndex].Pos = firstPos.WithIsStmt() break } -- 2.50.0