pass: improve unknown label error message

This commit is contained in:
Michael McLoughlin
2019-03-17 22:35:54 -07:00
parent 87539d3a7f
commit 7a0eb66183

View File

@@ -58,7 +58,7 @@ func CFG(fn *ir.Function) error {
} }
target, found := fn.LabelTarget[*lbl] target, found := fn.LabelTarget[*lbl]
if !found { if !found {
return errors.New("unknown label") return fmt.Errorf("unknown label %q", *lbl)
} }
cur.Succ = append(cur.Succ, target) cur.Succ = append(cur.Succ, target)
} }