]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Context: move profile_use/profile_generate
authorThomas Otto <thomas.otto@pdv-fs.de>
Fri, 24 Jan 2020 19:20:45 +0000 (20:20 +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 a85c2ed99823b172dcd45d224eef6f3080b73571..96c1356455b9aea0be7b795153a6a0210aa65a91 100644 (file)
@@ -1925,7 +1925,7 @@ calculate_result_name(Context& ctx,
   //
   // The profile directory can be specified as an argument to
   // -fprofile-generate=, -fprofile-use= or -fprofile-dir=.
-  if (profile_generate) {
+  if (ctx.args_info.profile_generate) {
     if (ctx.args_info.profile_dir.empty()) {
       ctx.args_info.profile_dir = from_cstr(get_cwd());
     }
@@ -1935,7 +1935,7 @@ calculate_result_name(Context& ctx,
     hash_string(hash, ctx.args_info.profile_dir);
   }
 
-  if (profile_use) {
+  if (ctx.args_info.profile_use) {
     // Calculate gcda name.
     if (ctx.args_info.profile_dir.empty()) {
       ctx.args_info.profile_dir = from_cstr(get_cwd());
@@ -3705,8 +3705,6 @@ do_cache_compilation(Context& ctx, char* argv[])
   }
 
   output_is_precompiled_header = ctx.args_info.output_is_precompiled_header;
-  profile_use = ctx.args_info.profile_use;
-  profile_generate = ctx.args_info.profile_generate;
   using_precompiled_header = ctx.args_info.using_precompiled_header;
 
   arch_args_size = ctx.args_info.arch_args_size;
index 28cb82d1b1328ed794d3c095ef3c694e591f0aa0..fe4af6b3bc9ba265ffdd13177241525dd3666418 100644 (file)
@@ -78,10 +78,6 @@ bool output_is_precompiled_header = false;
 // should hard-depend on it if possible.
 enum guessed_compiler guessed_compiler = GUESSED_UNKNOWN;
 
-// Profile generation / usage information.
-bool profile_use = false;
-bool profile_generate = false;
-
 // Whether we are using a precompiled header (either via -include, #include or
 // clang's -include-pch or -include-pth).
 bool using_precompiled_header = false;
index 6be4d932a21066adffe15ffff89db996ca221fac..bc283a1434fa6d993316222a89d15396aadc2fd9 100644 (file)
@@ -64,9 +64,6 @@ extern bool output_is_precompiled_header;
 
 extern enum guessed_compiler guessed_compiler;
 
-extern bool profile_use;
-extern bool profile_generate;
-
 extern bool using_precompiled_header;
 
 extern char* included_pch_file;
index 801980dea1567a8ca5d160d36490fa1c3c46a306..0416322c2928ae571a5287b3785432a4b4c7fcd9 100644 (file)
@@ -85,8 +85,6 @@ cc_process_args(Context& ctx,
                                  compiler_args);
 
   output_is_precompiled_header = ctx.args_info.output_is_precompiled_header;
-  profile_use = ctx.args_info.profile_use;
-  profile_generate = ctx.args_info.profile_generate;
   using_precompiled_header = ctx.args_info.using_precompiled_header;
 
   return success;