freedreno/computerator: Fix defined-but-not-used warnings from lex/yacc.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3954>
This commit is contained in:
Eric Anholt 2020-02-25 16:25:05 -08:00 committed by Marge Bot
parent bd53f4f56b
commit ec2f905ca8
2 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,8 @@
#include "ir3/ir3.h"
#include "ir3_parser.h"
#define YY_NO_INPUT
#define YY_NO_UNPUT
#define TOKEN(t) (ir3_yylval.tok = t)
extern YYSTYPE ir3_yylval;

View File

@ -222,12 +222,14 @@ struct ir3 * ir3_parse(struct ir3_kernel *k, FILE *f)
}
%{
#if YYDEBUG
static void print_token(FILE *file, int type, YYSTYPE value)
{
fprintf(file, "\ntype: %d\n", type);
}
#define YYPRINT(file, type, value) print_token(file, type, value)
#endif
%}
%token <num> T_INT