mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glsl/glcpp: move macro declaration before code to fix MSVC build
Reviewed-by: Carl Worth <cworth@cworth.org>
This commit is contained in:
parent
acaed8f41d
commit
faa6b0cdc3
1 changed files with 2 additions and 1 deletions
|
|
@ -265,13 +265,14 @@ control_line:
|
|||
| HASH_UNDEF {
|
||||
glcpp_parser_resolve_implicit_version(parser);
|
||||
} IDENTIFIER NEWLINE {
|
||||
macro_t *macro;
|
||||
if (strcmp("__LINE__", $3) == 0
|
||||
|| strcmp("__FILE__", $3) == 0
|
||||
|| strcmp("__VERSION__", $3) == 0)
|
||||
glcpp_error(& @1, parser, "Built-in (pre-defined)"
|
||||
" macro names can not be undefined.");
|
||||
|
||||
macro_t *macro = hash_table_find (parser->defines, $3);
|
||||
macro = hash_table_find (parser->defines, $3);
|
||||
if (macro) {
|
||||
hash_table_remove (parser->defines, $3);
|
||||
ralloc_free (macro);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue