glsl: Add missing location info to case labels.

Otherwise, the upcoming error messages said the location was 0:0(0).

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Eric Anholt 2012-01-30 09:41:55 -08:00
parent 2c3e10e719
commit 663dcbbffe

View file

@ -1691,10 +1691,12 @@ case_label:
CASE expression ':'
{
$$ = new(state) ast_case_label($2);
$$->set_location(yylloc);
}
| DEFAULT ':'
{
$$ = new(state) ast_case_label(NULL);
$$->set_location(yylloc);
}
;