diff options
author | Martin Liska <mliska@suse.cz> | 2016-05-19 17:02:30 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-05-19 15:02:30 +0000 |
commit | b898d037f36e31b1ec3c33e9b254c86b213138d3 (patch) | |
tree | 29895ab029af340313dd92aae40ea7874203c3d5 /gcc/lto-streamer.c | |
parent | f65970cfd092c36035f7a3c683707c2604bcd4a3 (diff) | |
download | gcc-b898d037f36e31b1ec3c33e9b254c86b213138d3.zip gcc-b898d037f36e31b1ec3c33e9b254c86b213138d3.tar.gz gcc-b898d037f36e31b1ec3c33e9b254c86b213138d3.tar.bz2 |
LTO: display file name if LTO version check fails
* lto-section-in.c (lto_get_section_data): Call
lto_check_version with additional argument.
* lto-streamer.c (lto_check_version): Add new argument.
* lto-streamer.h (lto_check_version): Likewise.
From-SVN: r236464
Diffstat (limited to 'gcc/lto-streamer.c')
-rw-r--r-- | gcc/lto-streamer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c index 5e35aac..bfde1fe 100644 --- a/gcc/lto-streamer.c +++ b/gcc/lto-streamer.c @@ -376,12 +376,13 @@ lto_orig_address_remove (tree t) /* Check that the version MAJOR.MINOR is the correct version number. */ void -lto_check_version (int major, int minor) +lto_check_version (int major, int minor, const char *file_name) { if (major != LTO_major_version || minor != LTO_minor_version) fatal_error (input_location, - "bytecode stream generated with LTO version %d.%d instead " - "of the expected %d.%d", + "bytecode stream in file '%s' generated with LTO version " + "%d.%d instead of the expected %d.%d", + file_name, major, minor, LTO_major_version, LTO_minor_version); } |