summaryrefslogtreecommitdiff
path: root/gcc/coverage.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
committerRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
commitd58952aefb03632bbb5b441d5c0bd330711f0af1 (patch)
treed046e56bfbd6a40106ae6ab96fafc954f1dfc955 /gcc/coverage.c
parent648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff)
parent50221fae802a10fafe95e61d40504a58da33e98f (diff)
downloadgcc-linaro-dev/sve.tar.gz
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r--gcc/coverage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c
index 8a56a677f15..ea05d94f441 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -663,8 +663,15 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum)
gcov_write_unsigned (cfg_checksum);
gcov_write_string (IDENTIFIER_POINTER
(DECL_ASSEMBLER_NAME (current_function_decl)));
+ gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl));
gcov_write_filename (xloc.file);
gcov_write_unsigned (xloc.line);
+ gcov_write_unsigned (xloc.column);
+
+ expanded_location endloc = expand_location (cfun->function_end_locus);
+
+ /* Function can start in a single file and end in another one. */
+ gcov_write_unsigned (endloc.file == xloc.file ? endloc.line : xloc.line);
gcov_write_length (offset);
return !gcov_is_error ();
@@ -1262,6 +1269,9 @@ coverage_init (const char *filename)
gcov_write_unsigned (GCOV_NOTE_MAGIC);
gcov_write_unsigned (GCOV_VERSION);
gcov_write_unsigned (bbg_file_stamp);
+
+ /* Do not support has_unexecuted_blocks for Ada. */
+ gcov_write_unsigned (strcmp (lang_hooks.name, "GNU Ada") != 0);
}
}