Skip to content

Commit c641900

Browse files
derekparkergopherbot
authored andcommitted
cmd/compile: prefer base.Fatalf to panic in dwarfgen
Updates a few spots which call `panic` to instead call `base.Fatalf`. Change-Id: I30b73c7994caa647245b0e253f20e0b88185e644 GitHub-Last-Rev: b3839bb GitHub-Pull-Request: #74616 Reviewed-on: https://go-review.googlesource.com/c/go/+/688035 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent d71d8ae commit c641900

File tree

1 file changed

+2
-2
lines changed
  • src/cmd/compile/internal/dwarfgen

1 file changed

+2
-2
lines changed

src/cmd/compile/internal/dwarfgen/dwarf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func createDwarfVars(fnsym *obj.LSym, complexOK bool, fn *ir.Func, apDecls []*ir
203203
continue
204204
}
205205
if n.Class != ir.PPARAMOUT || !n.IsOutputParamInRegisters() {
206-
panic("invalid ir.Name on debugInfo.RegOutputParams list")
206+
base.Fatalf("invalid ir.Name on debugInfo.RegOutputParams list")
207207
}
208208
dcl = append(dcl, n)
209209
}
@@ -583,7 +583,7 @@ func createHeapDerefLocationList(n *ir.Name, entryID ssa.ID) []byte {
583583
// in the DWARF info.
584584
func RecordFlags(flags ...string) {
585585
if base.Ctxt.Pkgpath == "" {
586-
panic("missing pkgpath")
586+
base.Fatalf("missing pkgpath")
587587
}
588588

589589
type BoolFlag interface {

0 commit comments

Comments
 (0)