1
0
mirror of https://github.com/golang/go synced 2024-11-27 04:11:22 -07:00

cmd/internal/obj: call delete directly without check exist

Change-Id: I5350c6374cd39ce4512d29cd8a341c4996f3b601
Reviewed-on: https://go-review.googlesource.com/c/go/+/436703
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
cuiweixie 2022-09-29 20:52:42 +08:00 committed by Gopher Robot
parent 1f15838392
commit 1a6af5f7a0

View File

@ -294,9 +294,7 @@ func linkpcln(ctxt *Link, cursym *LSym) {
inlMarkProgs[inlMark.p] = struct{}{}
}
for p := fn.Text; p != nil; p = p.Link {
if _, ok := inlMarkProgs[p]; ok {
delete(inlMarkProgs, p)
}
delete(inlMarkProgs, p)
}
if len(inlMarkProgs) > 0 {
ctxt.Diag("one or more instructions used as inline markers are no longer reachable")