Look for .gcda files in profile directory when using profile

Minor whitespace fixes; removing unused declaration
This commit is contained in:
Chris AtLee 2011-07-25 07:18:38 -04:00
parent d2a298e996
commit 37ade14d5c
2 changed files with 7 additions and 5 deletions

View File

@ -1036,7 +1036,7 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode)
}
/*
* For profile generation (-fprofile-arcs, -fprofile-generate):
* For profile generation (-fprofile-arcs, -fprofile-generate):
* - hash profile directory
* - output to the real file first
*
@ -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 */

View File

@ -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 */