]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add rulegen diagnostic
authorKeith Randall <khr@google.com>
Tue, 22 May 2018 16:12:35 +0000 (09:12 -0700)
committerKeith Randall <khr@golang.org>
Tue, 22 May 2018 16:40:34 +0000 (16:40 +0000)
When rulegen complains about a missing type, report the line number
in the rules file.

Change-Id: Ic7c19e1d5f29547911909df5788945848a6080ff
Reviewed-on: https://go-review.googlesource.com/114004
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/gen/rulegen.go

index cc81e24ddead1db6bc03209f67330ff788800ed0..de52523afd3c7e59d21aa67dfc1dcd73cf5c6628 100644 (file)
@@ -548,7 +548,7 @@ func genResult0(w io.Writer, arch arch, result string, alloc *int, top, move boo
                }
        } else {
                if typ == "" {
-                       log.Fatalf("sub-expression %s (op=Op%s%s) must have a type", result, oparch, op.name)
+                       log.Fatalf("sub-expression %s (op=Op%s%s) at %s must have a type", result, oparch, op.name, loc)
                }
                v = fmt.Sprintf("v%d", *alloc)
                *alloc++