1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:14:49 -07:00

cmd/compile: add rulegen diagnostic

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>
This commit is contained in:
Keith Randall 2018-05-22 09:12:35 -07:00 committed by Keith Randall
parent c5ed10f3be
commit 31ef3846a7

View 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++