]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Look for .gcda files in profile directory when using profile
authorChris AtLee <catlee@mozilla.com>
Mon, 25 Jul 2011 11:18:38 +0000 (07:18 -0400)
committerChris AtLee <catlee@mozilla.com>
Mon, 25 Jul 2011 11:18:38 +0000 (07:18 -0400)
Minor whitespace fixes; removing unused declaration

ccache.c
compopt.h

index e5226dd33b001be4f897fd35dedfc89099fab0e7..49e689f40771be1a1051b6a11b7b7df2591a90b1 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1036,8 +1036,8 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
        }
 
        /*
-        * For profile generation (-fprofile-arcs, -fprofile-generate):
-        * - hash profile directory 
+        * For profile generation (-fprofile-arcs, -fprofile-generate):
+        * - hash profile directory
         * - output to the real file first
         *
         * For profile usage (-fprofile-use):
@@ -1068,10 +1068,13 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
        }
        if (profile_use) {
                /* Calculate gcda name */
-               /* TODO: Look at value of -fprofile-use= or -fprofile-dir= */
                output_to_real_object_first = true;
                base_name = remove_extension(output_obj);
-               gcda_name = format("%s.gcda", base_name);
+               if (profile_dir) {
+                       gcda_name = format("%s.gcda", base_name);
+               } else {
+                       gcda_name = format("%s/%s.gcda", profile_dir, base_name);
+               }
                free(base_name);
                hash_delimiter(hash, "-fprofile-use");
                /* Add the gcda to our hash */
index 5e64d7e5cbec69c15ed86b17ad1f9f348aeb5d5d..8985ac3d7853781e36d1ab8ebfde56ce3c24286e 100644 (file)
--- a/compopt.h
+++ b/compopt.h
@@ -9,6 +9,5 @@ bool compopt_too_hard(const char *option);
 bool compopt_too_hard_for_direct_mode(const char *option);
 bool compopt_takes_path(const char *option);
 bool compopt_takes_arg(const char *option);
-bool compopt_needs_realdir(const char *option);
 
 #endif /* CCACHE_COMPOPT_H */