]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Context: move generating_coverage
authorThomas Otto <thomas.otto@pdv-fs.de>
Fri, 24 Jan 2020 18:45:36 +0000 (19:45 +0100)
committerThomas Otto <thomas.otto@pdv-fs.de>
Thu, 13 Feb 2020 22:51:43 +0000 (23:51 +0100)
src/ccache.cpp
src/legacy_globals.cpp
src/legacy_globals.hpp
unittest/test_argument_processing.cpp

index 3405ea9414a526e07b4b9fdba5a0e0b392429912..d0afb826d2691ca1a00fa83f5e5395832b098fbc 100644 (file)
@@ -1344,7 +1344,7 @@ to_cache(Context& ctx,
   if (ctx.args_info.generating_dependencies) {
     result_file_map.emplace(FileType::dependency, ctx.args_info.output_dep);
   }
-  if (generating_coverage) {
+  if (ctx.args_info.generating_coverage) {
     result_file_map.emplace(FileType::coverage, ctx.args_info.output_cov);
   }
   if (generating_stackusage) {
@@ -1676,7 +1676,7 @@ hash_common_info(Context& ctx,
   }
 
   // Possibly hash the coverage data file path.
-  if (generating_coverage && profile_arcs) {
+  if (ctx.args_info.generating_coverage && profile_arcs) {
     char* dir = x_dirname(ctx.args_info.output_obj.c_str());
     if (profile_dir) {
       dir = x_strdup(profile_dir);
@@ -2089,7 +2089,7 @@ from_cache(Context& ctx,
   if (produce_dep_file) {
     result_file_map.emplace(FileType::dependency, ctx.args_info.output_dep);
   }
-  if (generating_coverage) {
+  if (ctx.args_info.generating_coverage) {
     result_file_map.emplace(FileType::coverage, ctx.args_info.output_cov);
   }
   if (generating_stackusage) {
@@ -3565,7 +3565,6 @@ cc_reset(void)
   ignore_headers_len = 0;
   g_included_files.clear();
   has_absolute_include_headers = false;
-  generating_coverage = false;
   generating_stackusage = false;
   profile_arcs = false;
   i_tmpfile = NULL;
@@ -3709,7 +3708,6 @@ do_cache_compilation(Context& ctx, char* argv[])
     failed(); // stats_update is called in cc_process_args.
   }
 
-  generating_coverage = ctx.args_info.generating_coverage;
   generating_stackusage = ctx.args_info.generating_stackusage;
   generating_diagnostics = ctx.args_info.generating_diagnostics;
   seen_split_dwarf = ctx.args_info.seen_split_dwarf;
@@ -3741,7 +3739,7 @@ do_cache_compilation(Context& ctx, char* argv[])
   if (ctx.args_info.generating_dependencies) {
     cc_log("Dependency file: %s", ctx.args_info.output_dep.c_str());
   }
-  if (generating_coverage) {
+  if (ctx.args_info.generating_coverage) {
     cc_log("Coverage file: %s", ctx.args_info.output_cov.c_str());
   }
   if (generating_stackusage) {
index 3ab84a27517c85be25897a53937917e8096761cf..f7db270d8f15b69ba95b450826db92adb51a973b 100644 (file)
@@ -58,9 +58,6 @@ char** ignore_headers;
 // Size of headers to ignore list.
 size_t ignore_headers_len;
 
-// Is the compiler being asked to output coverage?
-bool generating_coverage;
-
 // Is the compiler being asked to output stack usage?
 bool generating_stackusage;
 
index ed0ace5e2f0536905a65369279b53f11c26e5d8d..2bba7140af3d1c6e83a269b03332165d58f4ac40 100644 (file)
@@ -54,8 +54,6 @@ extern char** ignore_headers;
 
 extern size_t ignore_headers_len;
 
-extern bool generating_coverage;
-
 extern bool generating_stackusage;
 
 extern bool generating_diagnostics;
index 72c5f8238fc98351630e515e1df8343889abbbe9..6de515245fe80ecab0610a81c4ef4cfa542f4a00 100644 (file)
@@ -84,7 +84,6 @@ cc_process_args(Context& ctx,
                                  extra_args_to_hash,
                                  compiler_args);
 
-  generating_coverage = ctx.args_info.generating_coverage;
   generating_stackusage = ctx.args_info.generating_stackusage;
   generating_diagnostics = ctx.args_info.generating_diagnostics;
   seen_split_dwarf = ctx.args_info.seen_split_dwarf;