From: Josh Bleecher Snyder Date: Sat, 1 Apr 2017 01:06:19 +0000 (-0700) Subject: cmd/compile: enforce that all nodes are used when generating DWARF X-Git-Tag: go1.9beta1~854 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=877574725ba251be743c47ecbe49958b6cf8b814;p=gostls13.git cmd/compile: enforce that all nodes are used when generating DWARF No particular need for this, but it's nice to enforce invariants when they are available. Change-Id: Ia6fa88dc4116f65dac2879509746e123e2c1862a Reviewed-on: https://go-review.googlesource.com/39201 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Matthew Dempsky --- diff --git a/src/cmd/compile/internal/gc/pgen.go b/src/cmd/compile/internal/gc/pgen.go index 06b7e5a691..d835d949de 100644 --- a/src/cmd/compile/internal/gc/pgen.go +++ b/src/cmd/compile/internal/gc/pgen.go @@ -327,7 +327,7 @@ func debuginfo(fnsym *obj.LSym, curfn interface{}) []*dwarf.Var { switch n.Class { case PAUTO: if !n.Used() { - continue + Fatalf("debuginfo unused node (AllocFrame should truncate fn.Func.Dcl)") } name = obj.NAME_AUTO