vkd3d-shader: Treat undefined identifiers as equal to 0 in #if directives.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-01-19 11:18:17 -06:00 committed by Alexandre Julliard
parent d31f288111
commit d4929660c3

View File

@ -588,6 +588,11 @@ expr
$$ = preproc_parse_integer($1);
vkd3d_free($1);
}
| T_IDENTIFIER
{
$$ = 0;
vkd3d_free($1);
}
| T_DEFINED T_IDENTIFIER
{
$$ = !!preproc_find_macro(ctx, $2);