[Intel-gfx] [PATCH 61/90] assembler: Add the input filename to the error/warning messages
Damien Lespiau
damien.lespiau at intel.com
Mon Feb 4 16:27:56 CET 2013
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
assembler/gen4asm.h | 2 ++
assembler/gram.y | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h
index 1e67c1c..9558a29 100644
--- a/assembler/gen4asm.h
+++ b/assembler/gen4asm.h
@@ -47,6 +47,8 @@ extern long int gen_level;
#define WARN_ALL (1 << 31)
extern unsigned int warning_flags;
+extern char *input_filename;
+
extern struct brw_context genasm_context;
extern struct brw_compile genasm_compile;
diff --git a/assembler/gram.y b/assembler/gram.y
index b3578e8..93d3bd5 100644
--- a/assembler/gram.y
+++ b/assembler/gram.y
@@ -120,10 +120,10 @@ static void message(enum message_level level, YYLTYPE *location,
va_list args;
if (location)
- fprintf(stderr, "%d:%d: %s: ", location->first_line,
+ fprintf(stderr, "%s:%d:%d: %s: ", input_filename, location->first_line,
location->first_column, level_str[level]);
else
- fprintf(stderr, "%s: ", level_str[level]);
+ fprintf(stderr, "%s:%s: ", input_filename, level_str[level]);
va_start(args, fmt);
vfprintf(stderr, fmt, args);
--
1.7.7.5
More information about the Intel-gfx
mailing list