summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-01-27 01:32:52 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:40 +0000
commit1eb622a8477e1e850bbd7d6a1ff500a3b4eb4181 (patch)
treeddd08f8fd72feac8b320ae37435983b78abbaeee /assembler
parent95b12082d272699ade246f625d4fa231c3ae5204 (diff)
assembler: Add the input filename to the error/warning messages
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'assembler')
-rw-r--r--assembler/gen4asm.h2
-rw-r--r--assembler/gram.y4
2 files changed, 4 insertions, 2 deletions
diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h
index 1e67c1cd..9558a29f 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 b3578e82..93d3bd58 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);