diff options
author | Martin Liska <mliska@suse.cz> | 2021-11-11 16:42:23 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-12-02 14:13:09 +0100 |
commit | cde87638bf5cf6aafffb590986b6a890da0ba06c (patch) | |
tree | 992cb983e1e788230e477b16112c83026c6d57f1 /gcc/coverage.c | |
parent | 6f43a8a08053a871e785e2ebc80383e0849efb6f (diff) | |
download | gcc-cde87638bf5cf6aafffb590986b6a890da0ba06c.zip gcc-cde87638bf5cf6aafffb590986b6a890da0ba06c.tar.gz gcc-cde87638bf5cf6aafffb590986b6a890da0ba06c.tar.bz2 |
Implement -fprofile-prefix-map.
PR gcov-profile/96092
gcc/ChangeLog:
* common.opt: New option.
* coverage.c (coverage_begin_function): Emit filename with
remap_profile_filename.
* doc/invoke.texi: Document the new option.
* file-prefix-map.c (add_profile_prefix_map): New.
(remap_profile_filename): Likewise.
* file-prefix-map.h (add_profile_prefix_map): Likewise.
(remap_profile_filename): Likewise.
* lto-opts.c (lto_write_options): Handle
OPT_fprofile_prefix_map_.
* opts-global.c (handle_common_deferred_options): Likewise.
* opts.c (common_handle_option): Likewise.
(gen_command_line_string): Likewise.
* profile.c (output_location): Emit filename with
remap_profile_filename.
Diffstat (limited to 'gcc/coverage.c')
-rw-r--r-- | gcc/coverage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/coverage.c b/gcc/coverage.c index 4daa3f9..7f8b532 100644 --- a/gcc/coverage.c +++ b/gcc/coverage.c @@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see #include "profile.h" #include "diagnostic.h" #include "varasm.h" +#include "file-prefix-map.h" #include "gcov-io.c" @@ -646,7 +647,7 @@ coverage_begin_function (unsigned lineno_checksum, unsigned cfg_checksum) gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl) && !DECL_FUNCTION_VERSIONED (current_function_decl) && !DECL_LAMBDA_FUNCTION_P (current_function_decl)); - gcov_write_filename (startloc.file); + gcov_write_filename (remap_profile_filename (startloc.file)); gcov_write_unsigned (startloc.line); gcov_write_unsigned (startloc.column); |