mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal/ssagen: conditon not need
n.Op() == ir.OFOR so n.Op() != ir.OFORUNTIL is always true
Change-Id: I97191783c1fb31ef76e0601f626b45af1e8d316e
GitHub-Last-Rev: f68f9fecfb
GitHub-Pull-Request: golang/go#45389
Reviewed-on: https://go-review.googlesource.com/c/go/+/307251
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
5cc5576a9c
commit
9abedf4827
1 changed files with 1 additions and 1 deletions
|
|
@ -1803,7 +1803,7 @@ func (s *state) stmt(n ir.Node) {
|
||||||
b.AddEdgeTo(bCond)
|
b.AddEdgeTo(bCond)
|
||||||
// It can happen that bIncr ends in a block containing only VARKILL,
|
// It can happen that bIncr ends in a block containing only VARKILL,
|
||||||
// and that muddles the debugging experience.
|
// and that muddles the debugging experience.
|
||||||
if n.Op() != ir.OFORUNTIL && b.Pos == src.NoXPos {
|
if b.Pos == src.NoXPos {
|
||||||
b.Pos = bCond.Pos
|
b.Pos = bCond.Pos
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue