Skip to content

Commit d199369

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Keith Randall <[email protected]>
1 parent 5003b62 commit d199369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/compile/internal/ssa/numberlines.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func numberLines(f *Func) {
149149
} else {
150150
for _, p := range b.Preds {
151151
pbi := p.Block().ID
152-
if endlines[pbi] != firstPos {
152+
if endlines[pbi].Line() != firstPos.Line() || !endlines[pbi].SameFile(firstPos) {
153153
b.Values[firstPosIndex].Pos = firstPos.WithIsStmt()
154154
break
155155
}

0 commit comments

Comments
 (0)