Commit d199369a authored by David Chase's avatar David Chase

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 <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
parent 5003b626
...@@ -149,7 +149,7 @@ func numberLines(f *Func) { ...@@ -149,7 +149,7 @@ func numberLines(f *Func) {
} else { } else {
for _, p := range b.Preds { for _, p := range b.Preds {
pbi := p.Block().ID pbi := p.Block().ID
if endlines[pbi] != firstPos { if endlines[pbi].Line() != firstPos.Line() || !endlines[pbi].SameFile(firstPos) {
b.Values[firstPosIndex].Pos = firstPos.WithIsStmt() b.Values[firstPosIndex].Pos = firstPos.WithIsStmt()
break break
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment