]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: enforce that all nodes are used when generating DWARF
authorJosh Bleecher Snyder <josharian@gmail.com>
Sat, 1 Apr 2017 01:06:19 +0000 (18:06 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 3 Apr 2017 01:23:06 +0000 (01:23 +0000)
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 <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/pgen.go

index 06b7e5a691de393de2ecf3dc73ea177a759d0b12..d835d949deddd7c30efd83ce588d41204032af31 100644 (file)
@@ -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