cmd/compile: do some TODOs about Fatalf

Separate CL in case I'm mistaken.

Change-Id: I6b5fa0efb27a6b4fb4c133698bd7e2f01b4cccdb
Reviewed-on: https://go-review.googlesource.com/c/go/+/521195
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2023-08-19 22:32:08 -07:00 committed by Gopher Robot
parent caf9e15fb7
commit d1593b7a4a
2 changed files with 10 additions and 8 deletions

View file

@ -129,11 +129,7 @@ func staticCall(call *ir.CallExpr) {
call.SetOp(ir.OCALLINTER)
call.X = x
default:
// TODO(mdempsky): Turn back into Fatalf after more testing.
if base.Flag.LowerM != 0 {
base.WarnfAt(call.Pos(), "failed to devirtualize %v (%v)", x, x.Op())
}
return
base.FatalfAt(call.Pos(), "failed to devirtualize %v (%v)", x, x.Op())
}
// Duplicated logic from typecheck for function call return