aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-md.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-07-16 13:45:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-07-16 13:45:20 +0000
commit8f2463105bc389b72bb78526168a1173eed032ef (patch)
treeec925b4d8b0de840d466f033d5dfe330f5dc083d /gcc/read-md.c
parentcc4726077d61d3c73edf2e909a397d78ec447540 (diff)
downloadgcc-8f2463105bc389b72bb78526168a1173eed032ef.zip
gcc-8f2463105bc389b72bb78526168a1173eed032ef.tar.gz
gcc-8f2463105bc389b72bb78526168a1173eed032ef.tar.bz2
read-md.h (fatal_at): Declare.
gcc/ * read-md.h (fatal_at): Declare. * read-md.c (fatal_at): New function. * genattrtab.c (insn_def, attr_desc, delay_desc): Use a file_location to record the source position. (check_attr_test): Take a file_location instead of a line number. Use fatal_at instead of fatal. (check_attr_value): Update after above changes, using "at" rather than "with_line" reporting functions. (convert_set_attr_alternative): Likewise. (gen_attr): Likewise. (check_defs): Likewise. Don't assign to read_md_filename. (gen_insn): Update initialization after above changes. (gen_delay): Likewise. (write_insn_cases): Print the filename for a define_peephole. (gen_insn_reserv): Take a line number as argument and update the call to check_attr_test. (main): Pass a line number to gen_insn_reserv. From-SVN: r225880
Diffstat (limited to 'gcc/read-md.c')
-rw-r--r--gcc/read-md.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/read-md.c b/gcc/read-md.c
index d93b116..8c9fecc 100644
--- a/gcc/read-md.c
+++ b/gcc/read-md.c
@@ -277,6 +277,19 @@ error_at (file_location loc, const char *msg, ...)
have_error = 1;
}
+/* Like message_at, but treat the condition as a fatal error. */
+
+void
+fatal_at (file_location loc, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start (ap, msg);
+ message_at_1 (loc, msg, ap);
+ va_end (ap);
+ exit (1);
+}
+
/* A printf-like function for reporting an error against line LINENO
in the current MD file. */