diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-05-23 10:20:01 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-05-23 10:20:01 +0000 |
commit | 15882fe97cb65d99dd117330ccc05c5c86404a85 (patch) | |
tree | ac95219a03635d6a5b7c622bcd2f14c557f798f6 /gcc/gcov.c | |
parent | da90c957c8583002f68b03575402179394d28ec6 (diff) | |
download | gcc-15882fe97cb65d99dd117330ccc05c5c86404a85.zip gcc-15882fe97cb65d99dd117330ccc05c5c86404a85.tar.gz gcc-15882fe97cb65d99dd117330ccc05c5c86404a85.tar.bz2 |
gcov.c (create_file_names): If no object directory is specified, keep the directory of the file.
* gcov.c (create_file_names): If no object directory is specified,
keep the directory of the file.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r174062
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r-- | gcc/gcov.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -652,13 +652,12 @@ release_structures (void) } } -/* Generate the names of the graph and data files. If OBJECT_DIRECTORY - is not specified, these are looked for in the current directory, - and named from the basename of the FILE_NAME sans extension. If - OBJECT_DIRECTORY is specified and is a directory, the files are in - that directory, but named from the basename of the FILE_NAME, sans - extension. Otherwise OBJECT_DIRECTORY is taken to be the name of - the object *file*, and the data files are named from that. */ +/* Generate the names of the graph and data files. If OBJECT_DIRECTORY + is not specified, these are named from FILE_NAME sans extension. If + OBJECT_DIRECTORY is specified and is a directory, the files are in that + directory, but named from the basename of the FILE_NAME, sans extension. + Otherwise OBJECT_DIRECTORY is taken to be the name of the object *file* + and the data files are named from that. */ static void create_file_names (const char *file_name) @@ -691,8 +690,8 @@ create_file_names (const char *file_name) else { name = XNEWVEC (char, length + 1); - name[0] = 0; - base = 1; + strcpy (name, file_name); + base = 0; } if (base) |